filterBam - filter BAM file for use with AUGUSTUS tools
Contents
Additional Documentation
An exhaustive documentation can be found in the file /usr/share/doc/augustus/README.md.gz.
FILTERBAM(1)
Description
The input file must be sorted lexicographically by 'queryname', with e.g.
• Convert the file into SAM format, sort lexicographically by queryname and convert back again into BAM
format.
E.g.
exportLC_ALL=Csamtoolsview-Hfile.bam>file_sorted.samsamtoolsviewfile.bam|sort-k1>>file_sorted.samsamtoolsview-bSfile_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.
• samtools and bamtools provide facilities to do the sorting, but they are not guaranteed to work
because of the problem mentioned above.
• In the case of samtools, the command to sort by 'queryname' is:
samtoolssort-n-ofile_sorted.bamfile.bam
For more information check the man page included in samtools distribution.
• bamtools can also sort bam files:
bamtoolssort-byname-infile.bam-outfile_sorted.bam
but only provides the option to do it by queryname.
Name
filterBam - filter BAM file for use with AUGUSTUS tools
Options
Mandatoryoptions-i, --in=in.bam
input file in BAM format
-o, --out=out.bam
output file in BAM format
Optionaloptions-u, --uniq
keep only the best match, remove all matches, if the second best is not much worse
-qf, --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
-en, --minId=n
minimal percentage of identity (default 92)
-cn, --minCover=n
minimal percentage of coverage of the query read (default 80)
-n, --noIntrons
do not allow longer gaps -for RNA-RNA alignments-
-ln, --insertLimit=n
maximum assumed size of inserts (default 10)
-sn, --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
-xn, --maxIntronLen=n
maximal separation of paired reads (default 500000)
-dfile, --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
-gfile, --commonGeneFile=file
file name in which to write cases where one read maps several different genes
-tn, --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.
Synopsis
filterBam --in in.bam --out out.bam [options]
