Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

double digest fasta files

import re,sys
from Bio import SeqIO

def print_ReSites(id,seqence):
    pattern=r"GATC"
    seq_len=len(seqence)
    sites = [str(m.start()) for m in re.finditer(pattern,seqence)]
    sites.append(str(seq_len))
    for start,end in zip(sites,sites[1:]):
        print id+"	"+start+"	"+end

for seq in SeqIO.parse(sys.argv[1],"fasta"):
    print_ReSites( str( seq.id),str(seq.seq))
Comment

PREVIOUS NEXT
Code Example
Python :: Update only keys in python 
Python :: python multiply numbers nested list 
Python :: useful functions in python 
Python :: Python | Pandas MultiIndex.is_lexsorted() 
Python :: merge python list items by index one after one 
Python :: numpy create array with infinities 
Python :: how to output varibles in python 
Python :: how to solve spacy no model en 
Python :: ploting bargraph with value_counts(with title x and y label and name angle) 
Python :: rotate to angle godot 
Python :: print all data in excel openpyxl 
Python :: concatenate the next row to the previous row pandas 
Python :: for count in range(size): 
Python :: sss 
Python :: dickyfuller test in python 
Python :: python scrapy 
Python :: Are angles of a parallelogram equal? 
Python :: turn off slip in frozen lake openai gym 
Python :: sumif in python on a column and create new column 
Python :: coercion python 
Python :: hpw to create related model in django rest framework logic 
Python :: send operator by parameter python 
Python :: how to convert small letters to capital letters in python 
Python :: fibonacci sequence python 2.7 
Python :: when was python 3 released 
Python :: using default as none in django mdoels 
Python :: mongoengine ObjectIdField 
Python :: np.conjugate 
Python :: deine dict with same values 
Python :: "opencv write video" 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =