Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bamfilter outputting .fa instead of .fq #99

Open
theo-llewellyn opened this issue Apr 9, 2020 · 3 comments
Open

Bamfilter outputting .fa instead of .fq #99

theo-llewellyn opened this issue Apr 9, 2020 · 3 comments

Comments

@theo-llewellyn
Copy link

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
Copy link

I'm also running into this issue.

@margaretc-ho
Copy link

margaretc-ho commented May 23, 2023

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
Copy link
Author

great thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants