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

Read alignment SAM file is not sorted correctly prior to score filtering #88

Open
ppericard opened this issue Jul 30, 2019 · 0 comments
Labels

Comments

@ppericard
Copy link
Member

The alignment filtering step should sort the SAM file by read id and alignment score before filtering. Right now the sorting is performed by the following command:

2019-07-29 13:47:23,161 - root - DEBUG - CMD: cat /media/data/test_matam/matam_dev_assembly/workdir/16sp.art_HS25_pe_100bp_50x.sortmerna_vs_SILVA_128_SSURef_NR95_b10_m10.sam | grep -v "^@" | sort -T /media/data/test_matam/matam_dev_assembly/workdir -S 10000M --parallel 6 -k 1,1V -k 12,12nr | /media/data/matam_dev/scripts/filter_score_multialign.py -t 0.9 --geometric > /media/data/test_matam/matam_dev_assembly/workdir/16sp.art_HS25_pe_100bp_50x.sortmerna_vs_SILVA_128_SSURef_NR95_b10_m10.scr_filt_geo_90pct.sam

However, -k 12,12nr doesnt work correctly on fields like AS:i:195 and the resulting file is not correctly sorted (at least on Ubuntu 18.04).

To sort correctly, we should be using the version sort -k 12,12Vr.
However, I'm suspecting this wont work for all sort versions, and might also depend on the locale variables

@ppericard ppericard added the bug label Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant