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

All Samples(40)  |  Call(36)  |  Derive(0)  |  Import(4)

src/b/i/biopython-1.63/Bio/SeqIO/SwissIO.py   biopython(Download)
    elif location_string.startswith(">"):  # e.g. ">13"
        try:
            return SeqFeature.AfterPosition(max(0, offset + int(location_string[1:])))
        except ValueError:
            pass

src/b/i/biopython-HEAD/Bio/SeqIO/SwissIO.py   biopython(Download)
    elif location_string.startswith(">"):  # e.g. ">13"
        try:
            return SeqFeature.AfterPosition(max(0, offset + int(location_string[1:])))
        except ValueError:
            pass

src/b/i/biopython-1.63/Bio/SeqIO/UniprotIO.py   biopython(Download)
                return SeqFeature.ExactPosition(position)
            elif status == 'greater than':
                return SeqFeature.AfterPosition(position)
            elif status == 'less than':
                return SeqFeature.BeforePosition(position)

src/b/i/biopython-HEAD/Bio/SeqIO/UniprotIO.py   biopython(Download)
                return SeqFeature.ExactPosition(position)
            elif status == 'greater than':
                return SeqFeature.AfterPosition(position)
            elif status == 'less than':
                return SeqFeature.BeforePosition(position)

src/b/i/biopython-1.63/Bio/GenBank/__init__.py   biopython(Download)
        return SeqFeature.BeforePosition(int(pos_str[1:])+offset)
    elif pos_str.startswith(">"):
        return SeqFeature.AfterPosition(int(pos_str[1:])+offset)
    elif _re_within_position.match(pos_str):
        s, e = pos_str[1:-1].split(".")

src/b/i/biopython-HEAD/Bio/GenBank/__init__.py   biopython(Download)
        return SeqFeature.BeforePosition(int(pos_str[1:])+offset)
    elif pos_str.startswith(">"):
        return SeqFeature.AfterPosition(int(pos_str[1:])+offset)
    elif _re_within_position.match(pos_str):
        s, e = pos_str[1:-1].split(".")

src/b/i/biopython-1.63/Tests/test_SeqIO_features.py   biopython(Download)
from Bio.SeqRecord import SeqRecord
from Bio.SeqFeature import SeqFeature, FeatureLocation, CompoundLocation
from Bio.SeqFeature import ExactPosition, BeforePosition, AfterPosition, \
                           OneOfPosition,  WithinPosition
 
    def test_simple_dna_join_after(self):
        """Feature on DNA (join, strand -1, after position)"""
        s = Seq("AAAAACCCCCTTTTTGGGGG", generic_dna)
        f1 = SeqFeature(FeatureLocation(5, 10), strand=-1)
        f2 = SeqFeature(FeatureLocation(12, AfterPosition(15)), strand=-1)
        f2 = SeqFeature(FeatureLocation(OneOfPosition(15, (ExactPosition(15),
                                                           ExactPosition(16))),
                                        AfterPosition(20)))
        f = make_join_feature([f1, f2])
        self.check(s, f, "FGHIJ"+"PQRST", "join(<6..10,one-of(16,17)..>20)")
    def test_fuzzy_join(self):
        """Features: write/read fuzzy join locations."""
        s = "N"*500
        f1 = SeqFeature(FeatureLocation(BeforePosition(10), 20), strand=+1)
        f2 = SeqFeature(FeatureLocation(25, AfterPosition(40)), strand=+1)
        self.record.features.append(f)
 
        f1 = SeqFeature(FeatureLocation(AfterPosition(310), 320), strand=-1)
        #Note - is one-of(340,337) allowed or should it be one-of(337,340)?
        f2 = SeqFeature(FeatureLocation(325, OneOfPosition(340, [ExactPosition(340),

src/b/i/biopython-HEAD/Tests/test_SeqIO_features.py   biopython(Download)
from Bio.SeqRecord import SeqRecord
from Bio.SeqFeature import SeqFeature, FeatureLocation, CompoundLocation
from Bio.SeqFeature import ExactPosition, BeforePosition, AfterPosition, \
                           OneOfPosition,  WithinPosition
 
    def test_simple_dna_join_after(self):
        """Feature on DNA (join, strand -1, after position)"""
        s = Seq("AAAAACCCCCTTTTTGGGGG", generic_dna)
        f1 = SeqFeature(FeatureLocation(5, 10), strand=-1)
        f2 = SeqFeature(FeatureLocation(12, AfterPosition(15)), strand=-1)
        f2 = SeqFeature(FeatureLocation(OneOfPosition(15, (ExactPosition(15),
                                                           ExactPosition(16))),
                                        AfterPosition(20)))
        f = make_join_feature([f1, f2])
        self.check(s, f, "FGHIJ"+"PQRST", "join(<6..10,one-of(16,17)..>20)")
    def test_fuzzy_join(self):
        """Features: write/read fuzzy join locations."""
        s = "N"*500
        f1 = SeqFeature(FeatureLocation(BeforePosition(10), 20), strand=+1)
        f2 = SeqFeature(FeatureLocation(25, AfterPosition(40)), strand=+1)
        self.record.features.append(f)
 
        f1 = SeqFeature(FeatureLocation(AfterPosition(310), 320), strand=-1)
        #Note - is one-of(340,337) allowed or should it be one-of(337,340)?
        f2 = SeqFeature(FeatureLocation(325, OneOfPosition(340, [ExactPosition(340),

src/b/i/biopython-1.63/Tests/test_SeqRecord.py   biopython(Download)
from Bio.SeqRecord import SeqRecord
from Bio.SeqFeature import SeqFeature, FeatureLocation, ExactPosition
from Bio.SeqFeature import WithinPosition, BeforePosition, AfterPosition, OneOfPosition
 
 
        f1 = SeqFeature(FeatureLocation(0, ExactPosition(10)))
        f2 = SeqFeature(FeatureLocation(WithinPosition(12, left=12, right=15), BeforePosition(22)))
        f3 = SeqFeature(FeatureLocation(AfterPosition(16),
                                        OneOfPosition(26, [ExactPosition(25), AfterPosition(26)])))
        self.record = SeqRecord(Seq("ABCDEFGHIJKLMNOPQRSTUVWZYX", generic_protein),

src/b/i/biopython-HEAD/Tests/test_SeqRecord.py   biopython(Download)
from Bio.SeqRecord import SeqRecord
from Bio.SeqFeature import SeqFeature, FeatureLocation, ExactPosition
from Bio.SeqFeature import WithinPosition, BeforePosition, AfterPosition, OneOfPosition
 
 
        f1 = SeqFeature(FeatureLocation(0, ExactPosition(10)))
        f2 = SeqFeature(FeatureLocation(WithinPosition(12, left=12, right=15), BeforePosition(22)))
        f3 = SeqFeature(FeatureLocation(AfterPosition(16),
                                        OneOfPosition(26, [ExactPosition(25), AfterPosition(26)])))
        self.record = SeqRecord(Seq("ABCDEFGHIJKLMNOPQRSTUVWZYX", generic_protein),

  1 | 2  Next