This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in chopping alignment files for each chromosome

Hello,

I have some alignment files for different samples. I want to make one file for each of the chromosome from all the alignment files. For example, I want to combine chromosome 1 from all alignment files for different samples and make one file. I tried:

while read i; do awk  "chr'$i'$"' $(ls *.bam) | cut -f 1 | sort -V > chr1$i.part; done

However, the output file is empty. I will appreciate any help to fix it. Thank you!

alignment

Thank you! I have it sorted and indexed and bam tools split worked for me. However, can I use this if my alignment files are in plain text format.

plain text format as in SAM instead of BAM format?

What's your awk trying to do, exactly?

0 answers

No answers yet.

Log in to answer this question.