Entering edit mode
2.4 years ago
tomas4482
▴
420
I need to extract the genome sequence of >10000 regions. For one example:
samtools faidx GRCh38.primary_assembly.genome.fa chr12:9074800-9074802
output:
AGA
But there are >10000 output. I don't know how to efficiently concatenate them into one single file just like:
AGA
GTA
GG
ATC
TGG
..
..
..
A possible solution I could find out is adding samtools faidx GRCh38.primary_assembly.genome.fa chr12:9074800-9074802> 1.txt
to create >10000 files. Then I concatenate all these files using other scripts. But it looks stupid.
Is there any other way to achieve this purpose? Thank you.
Thank you so much! I forgot samtools parameters.