Mimic input file with string
2
0
Entering edit mode
5.9 years ago

Hello,

That could be a simple question, I try to mimic an input file using simple string. An exemple with bedtools.

bedtools getfasta -fi genome.fa -bed test.bed -fo output.fa

With in test.bed :

chr1    5    10

I would like to do something lile this :

bedtools getfasta -fi genome.fa -bed 'chr1\t5\t10' -fo output.fa

I try to echo my string but this failed. Any ideas ? Thanks

bedtools • 1.1k views
ADD COMMENT
3
Entering edit mode
5.9 years ago
echo -e  "chr1\t5\t10" |  bedtools getfasta -fi genome.fa -bed - -fo output.fa
ADD COMMENT
1
Entering edit mode

I was thinking about something like this, thanks !

NB : typo on "'chr1\t5\t10" should be "chr1\t5\t10"

ADD REPLY
1
Entering edit mode

fixed thxs

ADD REPLY
2
Entering edit mode
5.9 years ago
microfuge ★ 1.9k

Would this work ? bedtools getfasta -fi genome.fa -bed <(echo chr1$'\t'5$'\t'10)

ADD COMMENT
0
Entering edit mode

Absolutly ! Thanks a lot

ADD REPLY

Login before adding your answer.

Traffic: 2850 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6