Question: bowtie2 output only mapped reads --no-unal option
0
gravatar for ravi.alla
4.1 years ago by
ravi.alla10
United States
ravi.alla10 wrote:

Hi,

I've been trying to run the galaxy bowtie2 tool and couldn't find an option to report only aligned reads. I believe bowtie2 reports all reads (both mapped and unmapped), but I thought using the flag to write unaligned reads to separate files, I would be able to get only aligned reads in my bam output. Am I missing something?

 

 

 

bowtie • 6.7k views
ADD COMMENTlink modified 4.1 years ago by Jennifer Hillman Jackson25k • written 4.1 years ago by ravi.alla10
0
gravatar for Jennifer Hillman Jackson
4.1 years ago by
United States
Jennifer Hillman Jackson25k wrote:

Hi,

This is correct - that option just subsets unaligned reads so that they can be easily worked with again (for example, to check for contamination/artifact).

Any BAM/SAM dataset can be filtered to remove unmapped reads. Use tools from the tool group "NGS: SAM Tools". Convert to SAM when needed, then filter. You can create a mini-workflow to do this automatically, along with the Tophat2 run, and hide the intermediate datasets (and then go back later to permanently delete them if you start to run out of space).

If you are interested, there are a few other Tophat2 options that may suit your case. These are not yet implemented in the Galaxy wrapper, but are listed in the manual, should you ever be running the tool line-command.
http://ccb.jhu.edu/software/tophat/manual.shtml

--no-discordant For paired reads, report only concordant mappings.

--no-mixed

 

 

For paired reads, only report read alignments if both reads in a pair can be mapped (by default, if TopHat cannot find a concordant or discordant alignment for both reads in a pair, it will find and report alignments for each read separately; this option disables that behavior).

 

 

 

Hopefully the post-Tophat filtering will work out for you, it is what most people choose to do. Jen, Galaxy team

ADD COMMENTlink modified 4.1 years ago • written 4.1 years ago by Jennifer Hillman Jackson25k

That is what I thought. Thanks for the clarification. Seems like a tedious work around, to use samtools to convert back to SAM and then filter (and maybe convert back to BAM). Is there a way to include a step to automatically delete intermediate files as part of a workflow? This would be invaluable for large analyses, when you are bound to run out of space.

Thanks

R

ADD REPLYlink written 4.1 years ago by ravi.alla10

Yes, see the "Step Actions" area in the workflow editor.  One of those actions is to clean up intermediate files -- this will delete any complete datasets (at the point in time the step the action is attached to completes) that no other jobs depend on, which are also not flagged as 'outputs' of the workflow.

ADD REPLYlink written 4.1 years ago by Dannon Baker3.7k

Thanks a lot Dannon. That is great to know. Makes my life much easier. 

ADD REPLYlink written 4.1 years ago by ravi.alla10

Yes, thanks Dannon! I forgot you could do that directly now in a workflow :)

ADD REPLYlink written 4.1 years ago by Jennifer Hillman Jackson25k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 182 users visited in the last hour