Skip to content

Commit

Permalink
inital commit
Browse files Browse the repository at this point in the history
  • Loading branch information
k-florek committed Feb 12, 2020
1 parent 17fd082 commit eb057a5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/rot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import os, sys
from Bio.Seq import Seq
from Bio.Alphabet import generic_dna

def rotate_contig(sequence,ori_start):
#if origin is at the start of the sequence don't rotate
if(ori_start < 3):
return sequence
#adjust start for 0 index
ori_start = ori_start - 1
#get front and back chunk of DNA
front_end = sequence[0:ori_start]
back_end = sequence[ori_start:]
#return sequence
return back_end + front_end

0 comments on commit eb057a5

Please sign in to comment.