Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(344)  |  Call(290)  |  Derive(0)  |  Import(54)

src/b/i/biopython-1.63/Bio/Nexus/Nexus.py   biopython(Download)
 
from Bio._py3k import zip
from Bio._py3k import range
from Bio._py3k import basestring
 
    # previous partitions usually don't make much sense in combined matrix
    # just initiate one new partition parted by single matrices
    combined.charpartitions = {'combined':{name:list(range(combined.nchar))}}
    for n, m in matrices[1:]:    # add all other matrices
        both = [t for t in combined.taxlabels if t in m.taxlabels]
                                         for tn, ts in m.taxsets.items()))
        # update new charpartition
        combined.charpartitions['combined'][n] = list(range(combined.nchar, combined.nchar+m.nchar))
        # update charlabels
        if m.charlabels:
                try:
                    options = options.replace('=', ' = ').split()
                    valued_indices = [(n-1, n, n+1) for n in range(len(options))
                                      if options[n] == '=' and n != 0 and n != len((options))]
                    indices = []
                    for sl in valued_indices:
                        indices.extend(sl)
                    token_indices = [n for n in range(len(options)) if n not in indices]

src/b/i/biopython-HEAD/Bio/Nexus/Nexus.py   biopython(Download)
 
from Bio._py3k import zip
from Bio._py3k import range
from Bio._py3k import basestring
 
    # previous partitions usually don't make much sense in combined matrix
    # just initiate one new partition parted by single matrices
    combined.charpartitions = {'combined':{name:list(range(combined.nchar))}}
    for n, m in matrices[1:]:    # add all other matrices
        both = [t for t in combined.taxlabels if t in m.taxlabels]
                                         for tn, ts in m.taxsets.items()))
        # update new charpartition
        combined.charpartitions['combined'][n] = list(range(combined.nchar, combined.nchar+m.nchar))
        # update charlabels
        if m.charlabels:
                try:
                    options = options.replace('=', ' = ').split()
                    valued_indices = [(n-1, n, n+1) for n in range(len(options))
                                      if options[n] == '=' and n != 0 and n != len((options))]
                    indices = []
                    for sl in valued_indices:
                        indices.extend(sl)
                    token_indices = [n for n in range(len(options)) if n not in indices]

src/b/i/biopython-1.63/Bio/motifs/matrix.py   biopython(Download)
import math
 
from Bio._py3k import range
 
from Bio.Seq import Seq
    def __str__(self):
        words = ["%6d" % i for i in range(self.length)]
        line = "   " + " ".join(words)
        lines = [line]
        for letter in self._letters:
                if isinstance(key1, slice):
                    start1, stop1, stride1 = key1.indices(len(self._letters))
                    indices1 = range(start1, stop1, stride1)
                    letters1 = [self._letters[i] for i in indices1]
                    dim1 = 2
                if isinstance(key2, slice):
                    start2, stop2, stride2 = key2.indices(self.length)
                    indices2 = range(start2, stop2, stride2)
                    dim2 = 2
                elif isinstance(key2, int):
        if isinstance(key, slice):
            start, stop, stride = key.indices(len(self._letters))
            indices = range(start, stop, stride)
            letters = [self._letters[i] for i in indices]
            dim = 2

src/b/i/biopython-HEAD/Bio/motifs/matrix.py   biopython(Download)
import math
 
from Bio._py3k import range
 
from Bio.Seq import Seq
    def __str__(self):
        words = ["%6d" % i for i in range(self.length)]
        line = "   " + " ".join(words)
        lines = [line]
        for letter in self._letters:
                if isinstance(key1, slice):
                    start1, stop1, stride1 = key1.indices(len(self._letters))
                    indices1 = range(start1, stop1, stride1)
                    letters1 = [self._letters[i] for i in indices1]
                    dim1 = 2
                if isinstance(key2, slice):
                    start2, stop2, stride2 = key2.indices(self.length)
                    indices2 = range(start2, stop2, stride2)
                    dim2 = 2
                elif isinstance(key2, int):
        if isinstance(key, slice):
            start, stop, stride = key.indices(len(self._letters))
            indices = range(start, stop, stride)
            letters = [self._letters[i] for i in indices]
            dim = 2

src/b/i/biopython-1.63/Bio/Graphics/GenomeDiagram/_CircularDrawer.py   biopython(Download)
from reportlab.graphics.shapes import ArcPath
 
from Bio._py3k import range
 
# GenomeDiagram imports
        trackunits = {} # Start and & units for each track keyed by track number
        heightholder = 0  # placeholder variable
        for track in range(bot_track, top_track+1): # track numbers to 'draw'
            try:
                trackheight = self._parent[track].height # Get track height
            # ones before self.start - but this seems wasteful.
            # Using tickiterval * (self.start/tickiterval) is a shortcut.
            for tickpos in range(tickiterval * (self.start//tickiterval),
                                 int(self.end), tickiterval):
                if tickpos <= start or end <= tickpos:
            ticklen = track.scale_smallticks * trackheight
            tickiterval = int(track.scale_smalltick_interval)
            for tickpos in range(tickiterval * (self.start//tickiterval),
                                 int(self.end), tickiterval):
                if tickpos <= start or end <= tickpos:
                if set.__class__ is GraphSet:
                    # Y-axis
                    for n in range(7):
                        angle = n * 1.0471975511965976
                        if angle < startangle or endangle < angle:

src/b/i/biopython-HEAD/Bio/Graphics/GenomeDiagram/_CircularDrawer.py   biopython(Download)
from reportlab.graphics.shapes import ArcPath
 
from Bio._py3k import range
 
# GenomeDiagram imports
        trackunits = {} # Start and & units for each track keyed by track number
        heightholder = 0  # placeholder variable
        for track in range(bot_track, top_track+1): # track numbers to 'draw'
            try:
                trackheight = self._parent[track].height # Get track height
            # ones before self.start - but this seems wasteful.
            # Using tickiterval * (self.start/tickiterval) is a shortcut.
            for tickpos in range(tickiterval * (self.start//tickiterval),
                                 int(self.end), tickiterval):
                if tickpos <= start or end <= tickpos:
            ticklen = track.scale_smallticks * trackheight
            tickiterval = int(track.scale_smalltick_interval)
            for tickpos in range(tickiterval * (self.start//tickiterval),
                                 int(self.end), tickiterval):
                if tickpos <= start or end <= tickpos:
                if set.__class__ is GraphSet:
                    # Y-axis
                    for n in range(7):
                        angle = n * 1.0471975511965976
                        if angle < startangle or endangle < angle:

src/b/i/biopython-1.63/Bio/Motif/_Motif.py   biopython(Download)
from __future__ import print_function
 
from Bio._py3k import range
 
from Bio.Seq import Seq
        self._check_length(len(instance))
        if self.has_counts:
            for i in range(self.length):
                let=instance[i]
                self.counts[let][i]+=1
        #we need to compute new pwm
        self._pwm = []
        for i in range(self.length):
            dict = {}
            #filling the dict with 0's
        self._log_odds = []
        pwm=self.pwm(laplace)
        for i in range(self.length):
            d = {}
            for a in self.alphabet.letters:
        res=0
        pwm=self.pwm()
        for i in range(self.length):
            res+=2
            for a in self.alphabet.letters:

src/b/i/biopython-HEAD/Bio/Motif/_Motif.py   biopython(Download)
from __future__ import print_function
 
from Bio._py3k import range
 
from Bio.Seq import Seq
        self._check_length(len(instance))
        if self.has_counts:
            for i in range(self.length):
                let=instance[i]
                self.counts[let][i]+=1
        #we need to compute new pwm
        self._pwm = []
        for i in range(self.length):
            dict = {}
            #filling the dict with 0's
        self._log_odds = []
        pwm=self.pwm(laplace)
        for i in range(self.length):
            d = {}
            for a in self.alphabet.letters:
        res=0
        pwm=self.pwm()
        for i in range(self.length):
            res+=2
            for a in self.alphabet.letters:

src/b/i/biopython-1.63/Bio/Restriction/PrintFormat.py   biopython(Download)
import re
 
from Bio._py3k import range
 
from Bio.Restriction import RanaConfig as RanaConf
        cutloc = {}
        x, counter, length = 0, 0, len(self.sequence)
        for x in range(60, length, 60):
            counter = x - 60
            l=[]
        emptyline = ' ' * 60
        Join = ''.join
        for base in range(60, length, 60):
            counter = base - 60
            line = emptyline

src/b/i/biopython-HEAD/Bio/Restriction/PrintFormat.py   biopython(Download)
import re
 
from Bio._py3k import range
 
from Bio.Restriction import RanaConfig as RanaConf
        cutloc = {}
        x, counter, length = 0, 0, len(self.sequence)
        for x in range(60, length, 60):
            counter = x - 60
            l=[]
        emptyline = ' ' * 60
        Join = ''.join
        for base in range(60, length, 60):
            counter = base - 60
            line = emptyline

  1 | 2 | 3 | 4 | 5 | 6  Next