ScienceParkStudyGroup / studyGroup

Gather together a group to skill-share, co-work, and create community
https://www.scienceparkstudygroup.info
Other
6 stars 12 forks source link

bedtools getfasta -s not working #40

Closed malj390 closed 5 years ago

malj390 commented 5 years ago

Hi all,

I posted a question on bedtools github but just in case is a naive question and someone here already knows why is not working.

https://github.com/arq5x/bedtools/issues/140

Thanks!

mgalland commented 5 years ago

I naively tried to reproduce the bedtools example given in the manual page: https://bedtools.readthedocs.io/en/latest/content/tools/getfasta.html

Given example:

$ cat test.fa
>chr1
AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG

$ cat test.bed
chr1 20 25 forward 1 +
chr1 20 25 reverse 1 -

$ bedtools getfasta -fi test.fa -bed test.bed -s -name
>forward
CGCTA
>reverse
TAGCG

What i obtain on my machine (bedtools v2.27.1):

bedtools getfasta -fi test.fa -bed test.bed -s
>forward()
CGCTA
>reverse()
CGCTA

What do you think? Is it a wrong implementation of the command? It seems to ignore the -s argument.

malj390 commented 5 years ago

I don't know if it influences the output but the options must be place after the first command get fasta. Anyway I got the same. It seems doesn't give back the reverse.

https://bedtools.readthedocs.io/en/latest/content/tools/getfasta.html

Like this: bedtools getfasta [OPTIONS] -fi <input FASTA> -bed <BED/GFF/VCF>

mgalland commented 5 years ago

Mmmh indeed, weird. I tried with the options before -fi and it gives the same output.... Has someone contacted the bedtools authors about this?

bedtools getfasta -name -s -fi test.fa -bed test.bed
>forward()
CGCTA
>reverse()
CGCTA
malj390 commented 5 years ago

I opened an issue on the bedtools github. I guess the authors should read it in there.