Пример #1
0
fsa = open(fasta_file)

#read the files in, open files with csv
with open('watermelon.gff', 'r') as melon:
    #create a csv reader object
    csvreader = csv.reader(melon, delimiter=',')
    for line in csvreader:
            if not line:
                continue
            else:
            
                for line in melon:
                    print(line)


for fsa in SeqIO.parser("watermelon.fsa", "fasta"):
	print(seq_record.id)
	print(repr(seq_record.seq))
	print(len(seq_record))

#sequence, source, features, begin, end, length, strand, phase,
attributes = line.split('\t')

fields = line.split('\t')
print(fields[3], fields[4]

#extract the DNA sequence from the genome for this feature 

substring = []

trimmed_dna = dna[0]
Пример #2
0
from Bio import SeqIO
count=0
for rec in SeqIO.parser("data/SRR567585.fastq", "fastq"):
    count+=1
print("%i reads" % count)

good_reads=(rec for rec in \ 
    SeqIO.parse("data/SRR567585.fastq","fastq") \
    if min(rec.letter_annotations["phred_quality"])>=20)
count=seqIO.write(good_reads, "good_quality.fastq", "fastq")
print("Saved %i reads" % count)