Question: Filter Bowtie 2 alignement
1
gravatar for Mic
2.4 years ago by
Mic • 70
Australia
Mic • 70 wrote:

Hi, I read this post (http://biofinysics.blogspot.com.au/2014/05/how-does-bowtie2-assign-mapq-scores.html) which describes on how to filter Bowtie 2 alignment with the following command:

awk '$5 == 3 || $5 == 8 || $5 == 23 || $5 == 24 || $5 == 40 || $5 == 42' file.sam

The idea behind the command is to get "unireads" with decent alignment scores.

How is it possible to convert the above awk command in Galaxy?

Mic

alignment bowtie samtools • 876 views
ADD COMMENT • link • modified 2.4 years ago by Devon Ryan • 1.9k • written 2.4 years ago by Mic • 70
3
gravatar for Devon Ryan
2.4 years ago by
Devon Ryan • 1.9k
Germany
Devon Ryan • 1.9k wrote:

If you convert your BAM file to SAM ("BAM to SAM" tool) then you can use the "text reformatting (with awk)" tool essentially given that script (sans file.sam).

Have said that, I would strongly encourage you to not do that, since what you're trying to do is rarely if ever useful (you might notice my name in that blog post, so I know a bit about the issue). A generally more useful process is to simply filter by MAPQ, which can be more easily done on the original BAM file.

ADD COMMENT • link written 2.4 years ago by Devon Ryan • 1.9k

Would you recommend to use MAPQ = 1?

ADD REPLY • link written 2.4 years ago by Mic • 70

More along the lines of 5 or 10, depending on the application.

ADD REPLY • link written 2.4 years ago by Devon Ryan • 1.9k

What would you use for SNP discovery and Chip-Seq or do you have a list of MAPQ values are best for a particular applications?

ADD REPLY • link written 2.4 years ago by Mic • 70

If your variant caller doesn't handle MAPQ scores already then try 5 (you're going to filter variants by quality anyway, so the random low MAPQ alignment here and there won't matter much). For ChIPseq, just mark duplicates and don't bother filtering.

ADD REPLY • link modified 2.4 years ago • written 2.4 years ago by Devon Ryan • 1.9k

Thank you. Did you mean with "text reformatting (with awk)" this tools from the toolshed 'text_processing'?

ADD REPLY • link written 2.4 years ago by Mic • 70

Sounds right, yes.

ADD REPLY • link written 2.4 years ago by Devon Ryan • 1.9k
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: 175 users visited in the last hour