I have a bed file (seq.bed) that contains "queryID queryStart queryEnd". Following is the example (the content of seq.bed file).
SRR5892231.6 28 178
SRR5892231.7 4 307
SRR5892231.7 16 307
SRR5892231.9 216 408
I would like to extract out sequences that have at least 100bp in their upstream regions. if I use the following awk,
awk 'OFS="\t" {print $1, $2-100, $2}' seq.bed
how can i use pipe to send the output to samtools for "samtools faidx seq.fna queryID:queryStar-queryEnd
"?
Could you please help me figure out how to pass $1, $2-100, and $2 for
samtools faidx seq.fna queryID:queryStar-queryEnd
?
Alex, this is great. Thank you very much.