Changeset 55 for liacs


Ignore:
Timestamp:
Dec 22, 2009, 7:52:22 AM (15 years ago)
Author:
Rick van der Zwet
Message:

Make it 'production' ready

File:
1 edited

Legend:

Unmodified
Added
Removed
  • liacs/dbdm/dbdm_4/parse-fasta.py

    r54 r55  
    11#!/usr/bin/env python
     2#
     3# Parse 2 FASTA files and print statistics
     4# BSDLicence
     5# Rick van der Zwet - 0433373 - <info@rickvaderzwet.nl>
    26from Bio import SeqIO,Seq
    37from Bio import Alphabet
     
    7074
    7175
     76# Get data
    7277file1 = parse_file("data/AE005174v2-1.fas")
    7378file2 = parse_file("data/AE005174v2-2.fas")
     79
    7480file1 = fasta.replace(file1)
    7581file2 = fasta.replace(file2)
     82
     83# Find overlap
    7684(retval, common, result) = concat(file2,file1)
    7785print retval, common
     86
     87# Strictly speaking there is a gap of about 4 kbs (4000 bs) between file1 and
     88# file2, so lets' put that into the the statistics as well. Due to circular
     89# nature, does not matter wether we add it in the beginning or in the end
     90result = result + "n" * 4000;
    7891stats(result)
    7992
     93# Write to file for later further processing
    8094out = open("full_contig.raw","w")
    8195out.write(result)
Note: See TracChangeset for help on using the changeset viewer.