DRL / blobtools

Modular command-line solution for visualisation, quality control and taxonomic partitioning of genome datasets
GNU General Public License v3.0
184 stars 44 forks source link

Bamfilter outputting .fa instead of .fq #99

Open theo-llewellyn opened 4 years ago

theo-llewellyn commented 4 years ago

Hello, Thanks for blobTools, it's a really wonderful piece of software. I'm using the bamfilter module to extract all sequences mapping to contigs of a particular taxon and though the original sequences were pe .fq files, bamfilter outputs .fa files. Do you know why this is and how to ensure .fq as the output format? My bam file was produced using bwa mem and then gatk. Cheers, Theo

bjreisman commented 4 years ago

I'm also running into this issue.

margaretc-ho commented 1 year ago

It's not in the web documentation on the site (https://blobtools.readme.io/docs/bamfilter), but you can output fastq using the -f fq flag of blobtools bamfilter. Just tested and it works. Fasta is the default.

(blobtools) [user@server blobtools]$ blobtools bamfilter -h usage: blobtools bamfilter -b FILE [-i FILE] [-e FILE] [-U] [-n] [-o PREFIX] [-f FORMAT] [-h|--help]

Options:
    -h --help                   show this
    -b, --bam FILE              BAM file (sorted by name)
    -i, --include FILE          List of contigs whose reads are included
                                - writes FASTAs of pairs where at least
                                    one read maps sequences in list
                                    (InUn.fq, InIn.fq, ExIn.fq)
    -e, --exclude FILE          List of contigs whose reads are excluded (outputs reads that do not map to sequences in list)
                                - writes FASTAs of pairs where at least
                                    one read does not maps to sequences in list
                                    (InUn.fq, InIn.fq, ExIn.fq)
    -U, --exclude_unmapped      Exclude pairs where both reads are unmapped
    -n, --noninterleaved        Use if fw and rev reads should be in separate files
    -f, --read_format FORMAT    FASTQ = fq, FASTA = fa [default: fa]
    -o, --out PREFIX            Output prefix
theo-llewellyn commented 1 year ago

great thanks for your help!