This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import math | |
def getContTable(ar1, ar2): | |
cont = {} | |
for i in xrange(0, len(ar1)): | |
keyAr1 = ar1[i] | |
keyAr2 = ar2[i] | |
if keyAr1 in cont: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from Bio.Seq import Seq | |
from Bio.SeqRecord import SeqRecord | |
from Bio.SeqFeature import SeqFeature, FeatureLocation | |
from Bio import SeqIO | |
# get all sequence records for the specified genbank file | |
recs = [rec for rec in SeqIO.parse("genbank_file.gbk", "genbank")] | |
# print the number of sequence records that were extracted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assuming that the file is tab-delimited ('\t') | |
delim = '\t' | |
# binary file path: | |
binary_patterns_filename = "binary_patterns.txt" | |
# get all of the lines in the binary patterns file | |
lines = [line.rstrip() for line in open(binary_patterns_filename, "r")] | |
# 1st line should contain the headers |
NewerOlder