FILTERBAM(1)
π 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.
samtoolsandbamtoolsprovide 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 π
bamtoolscan 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 (default0.96)-b,--bestβ output all best matches that satisfyminIdandminCover-e n,--minId=nβ minimal percentage of identity (default92)-c n,--minCover=nβ minimal percentage of coverage of the query read (default80)-n,--noIntronsβ do not allow longer gaps -for RNA-RNA alignments--l n,--insertLimit=nβ maximum assumed size of inserts (default10)-s n,--maxSortesTest=nβ test if input file is sorted by query name for this number of alignments (default100000)-p,--pairedβ require that paired reads are on opposite strands of same target. Requires alignment names to contain the suffixes/1,/2or/f,/rπ§-w,--pairwiseAlignmentsβ use in case alignments were done in pairwise fashion-x n,--maxIntronLen=nβ maximal separation of paired reads (default500000)-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β usenthreads for compression/decompression (default1); available only if library SeqLib >=1.2is 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
- ubuntu resolute: augustus 3.5.0+dfsg-5build4 Β· Artistic-1.0-Perl
- ubuntu stonking: augustus 3.5.0+dfsg-5build4 Β· Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms