Beispiel #1
0
def DrerioRange(chromoname, begin, end):
    print "D.rerio %s %d %d" % (chromoname, begin, end)
    b,e = map(int, [begin, end])
    fragrest = fetchREST('Danio rerio', chromoname, b, e)
    fragensembl = str(ensembl.Binomial('danio').chromosome(chromoname)[b:e+1])
    util.asFASTA(fragrest, open('D.rerio%srest.fas' % chromoname, 'w'),
      title='D.rerio chromosome %s %d to %d from REST'%(chromoname, b, e))
    util.asFASTA(fragensembl, open('D.rerio%sensembl.fas' % chromoname, 'w'),
      title='D.rerio chromosome %s %d to %d from Ensembl'%(chromoname, b, e))
    assert fragrest == fragensembl
Beispiel #2
0
    def asFASTA(self, out, linelength=79):
        """To the file object *out*, write the seuqnce in FASTA format.
        Lines will be limited to *linelength* characters (each line will
        have an additional newline).
        """

        return util.asFASTA(self[:], out,
          title=repr(self), linelength=linelength)