Flipping a DNA sequence (not reverse complementing) using command line/samtools?
2
1
Entering edit mode
12 months 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 • 919 views
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

5
Entering edit mode
12 months ago
GenoMax 119k

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

Install seqkit from here.

4
Entering edit mode
12 months ago

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

1
Entering edit mode

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

2
Entering edit mode

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