Samtools faidx not printing reverse complement
1
0
Entering edit mode
4.3 years ago
jamie.pike ▴ 80

I'm struggling to get samtools faidx to print the reverse complement of sequences: I believe the -i option should do the trick, but I keep getting an error message. I think it is trying to find "-i" in the fasta.

Command:

samtools faidx ./file_1.fasta MHLFILTNLILPAFEDLAQG -i

Output:

>MHLFILTNLILPAFEDLAQG
TCAGTCTGCAACTCCAAATACTTCAAGCGCATCTGGACCGCCGTGGAGTTCATCAGAAGT
GAGCGTGTCAGAATGATGATCAGCAACTATACTTACTTTCCCGACCTTGATGACCCTGCA
TCCCTGGGCCAGGTCTTCAAAGGCTGGAAGGATGAGGTTCGTCAATATGAAAAGGTGCAT
>-i
[fai_fetch] Warning - Reference --i not found in FASTA file, returning empty sequence
Segmentation fault (core dumped)

Samtools Version: 0.1.19-96b5f2294a

What am I doing wrong?

samtools faidx samtools reverse complement • 2.4k views
ADD COMMENT
1
Entering edit mode

Try samtools faidx ./file_1.fasta -i MHLFILTNLILPAFEDLAQG or samtools faidx -i ./file_1.fasta MHLFILTNLILPAFEDLAQG

ADD REPLY
0
Entering edit mode

Same problem I'm afraid:

samtools faidx ./file_1.fasta -i MHLFILTNLILPAFEDLAQG
>-i
[fai_fetch] Warning - Reference -i not found in FASTA file, returning empty sequence
>MHLFILTNLILPAFEDLAQG
TCAGTCTGCAACTCCAAATACTTCAAGCGCATCTGGACCGCCGTGGAGTTCATCAGAAGT
GAGCGTGTCAGAATGATGATCAGCAACTATACTTACTTTCCCGACCTTGATGACCCTGCA
TCCCTGGGCCAGGTCTTCAAAGGCTGGAAGGATGAGGTTCGTCAATATGAAAAGGTGCAT


samtools faidx -i ./file_1.fasta MHLFILTNLILPAFEDLAQG
[fai_load] build FASTA index.
open: No such file or directory
[_razf_open] fail to open -i
[fai_build] fail to open the FASTA file -i
[fai_load] fail to open FASTA index.

I'm not sure why it is not work-ng -it usually does!!

ADD REPLY
2
Entering edit mode
4.3 years ago

Your version of samtools is SUPER old. Looking at the samtools github, 0.1.19 was released at least 7 years ago. I'm guessing there was no -i option 7 years ago.

ADD COMMENT
0
Entering edit mode

You're right -it was the version! I am now using 1.9 and "-i" works perfectly. Thank you

ADD REPLY

Login before adding your answer.

Traffic: 1877 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