Flipping a DNA sequence (not reverse complementing) using command line/samtools?
2
1
Entering edit mode
2.7 years ago
noahhelton98 ▴ 80

Hi all,

I have BioNano Scaffolds of sequence data (no solid reference at the moment) and I am trying to orient them in the correct way to so I can do PCR and attempt to complete the sequence. One of my scaffolds is 67 MB, but I believe (based on BLATs and other context clues from the project) that this sequence is actually reversed. Is there a way using samtools or the command line to easily flip this sequence? Given that it is so big I would rather stay on the cluster and not have to download it to my computer to try and flip - but if that is what I need to do so be it.

Thanks so much!

contigs scaffolds bionano Sequencing • 1.5k views
ADD COMMENT
3
Entering edit mode

If your sequence is in plain text format, you can get the reversed sequence with a simple rev command (which is usually built-in):

echo "ACGTAG" | rev
GATGCA
ADD REPLY
5
Entering edit mode
2.7 years ago
GenoMax 141k

seqkit seq -r seq.fa > rev.fa.

Install seqkit from here.

ADD COMMENT
4
Entering edit mode
2.7 years ago

If you have the emboss package installed on the server you can use revseq seq.fa -reverse -nocomplement -outseq seq.rev.fa.

ADD COMMENT
1
Entering edit mode

Awesome, I'll install that if we don't - thanks so much I appreciate it!

ADD REPLY
2
Entering edit mode

sudo apt-get install emboss and you are ready to go :)

ADD REPLY

Login before adding your answer.

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