FILTERBAM(1)

πŸ“¦
version 3.5.0 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’… filterBam β€” like, the manual page (FILTERBAM(1)) ✨

okay bestie, sit down, hydrate, and let me tell you about filterBam 🫢 it filters a BAM file so your AUGUSTUS tools can actually use it. glowy. iconic. let's go πŸŽ€


🌸 NAME 🌸

filterBam β€” filter BAM file for use with AUGUSTUS tools ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

filterBam --in in.bam --out out.bam [options]

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea, and it is NOT optional: your input file must be sorted lexicographically by 'queryname'. no vibes-based sorting. lexicographic. periodt πŸ‘‘

here's how you make that happen:

  • Convert the file into SAM format, sort lexicographically by queryname and convert back again into BAM format. E.g.
export LC_ALL=C
samtools view -H file.bam > file_sorted.sam
samtools view file.bam | sort -k 1 >> file_sorted.sam
samtools view -bS file_sorted.sam > file_sorted.bam

(be aware: 'export LC_ALL=C' might be used because sort ignores characters like ':') πŸ™ˆ

Also, please bear in mind that this will require converting your BAM file into SAM. no skipping that step, babes.

  • samtools and bamtools provide facilities to do the sorting, but they are not guaranteed to work because of the problem mentioned above 😭 (the whole ':'-ignoring thing. yeah. that one.)
  • In the case of samtools, the command to sort by 'queryname' is:
samtools sort -n -o file_sorted.bam file.bam

For more information check the man page included in samtools distribution. iykyk πŸ“–

  • bamtools can also sort bam files:
bamtools sort -byname -in file.bam -out file_sorted.bam

but only provides the option to do it by queryname. that's the whole menu, bestie πŸ“


✨ OPTIONS ✨

πŸ‘‘ Mandatory options

  • -i, --in=in.bam β€” input file in BAM format. yes you have to give it. it's the whole point 🫢
  • -o, --out=out.bam β€” output file in BAM format. also required. also the whole point πŸ’–

🌈 Optional options

  • -u, --uniq β€” keep only the best match, remove all matches, if the second best is not much worse
  • -q f, --uniqThresh=f β€” threshold % for uniq, second best must be lower than this fraction of best to keep the best match (default 0.96)
  • -b, --best β€” output all best matches that satisfy minId and minCover
  • -e n, --minId=n β€” minimal percentage of identity (default 92)
  • -c n, --minCover=n β€” minimal percentage of coverage of the query read (default 80)
  • -n, --noIntrons β€” do not allow longer gaps -for RNA-RNA alignments-
  • -l n, --insertLimit=n β€” maximum assumed size of inserts (default 10)
  • -s n, --maxSortesTest=n β€” test if input file is sorted by query name for this number of alignments (default 100000)
  • -p, --paired β€” require that paired reads are on opposite strands of same target. Requires alignment names to contain the suffixes /1,/2 or /f,/r 🧚
  • -w, --pairwiseAlignments β€” use in case alignments were done in pairwise fashion
  • -x n, --maxIntronLen=n β€” maximal separation of paired reads (default 500000)
  • -d file, --pairBedFile=file β€” file name of pairedness coverage: a BED format file in which for each position the number of filtered read pairs is reported that contain the position in or between the reads
  • -g file, --commonGeneFile=file β€” file name in which to write cases where one read maps several different genes
  • -t n, --threads=n β€” use n threads for compression/decompression (default 1); available only if library SeqLib >= 1.2 is used πŸ”₯
  • -v, --verbose β€” output debugging info
  • -h, --help β€” produce help message.

πŸ’œ AUTHORS πŸ’œ

AUGUSTUS was written by M. Stanke, O. Keller, S. KΓΆnig, L. Gerischer and L. Romoth. absolute legends, no cap πŸ‘‘


πŸ“š ADDITIONAL DOCUMENTATION πŸ“š

An exhaustive documentation can be found in the file /usr/share/doc/augustus/README.md.gz. go read it, bestie, it's giving thorough πŸ“–βœ¨


ok that's the whole page 🫢 go sort your BAM lexicographically by queryname and slay πŸ’…

FILTERBAM(1) πŸ’– β€” that's the source/version tag and it's also on the footer line of the original page, so like, consider it signed, sealed, and delivered by your girl 🌸 mwah πŸ’‹

πŸ“¦ where this page comes from