Hi dears, i have a code like this in python:
strCommand = "./bwa index random_DNA_1000.fa"
os.system(strCommand)
strCommand = "./bwa mem random_DNA_1000.fa random_DNA_1000_8001.fq random_DNA_1000_8002.fq"
os.system(strCommand)
output of BWA MEM command contain some columns that i want filter output by "AS" column. Due to the large amount of data I can't work on the file and need to work with the stdout to speed up. Can anyone help me answer these questions? 1. How can I use BWA parameters so that the output contains only records whose field "AS" is less than one value? 2. How do I move the output of BWA to a list? (No file usage) Thanks in advance
not an answer, but aren't you re-inventing the wheel ?
SAM/BAM file filtering
Thanks for your attention. But due to the large amount of data I can't work on the file and need to work with the output of BWA directly from stdout. can i do?
https://en.wikipedia.org/wiki/Pipeline_(Unix)
thanks, I found a solution:
That solved my problem, but now I just want to put a filter on the records. This means that from the record with the field "AS" less than 135, only the field that shows the "read" will be listed !
Sooo you cannot save the file to disk but you can keep it entirely in memory without problems? That's cool.
Maybe I misunderstood. Since I want to work on BWA output, Working with disk will slow down. So i put the output to list.
Why would you do this in Python? As much as I love the language, you are not making your task easier here.