repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_documentation_string
stringlengths
1
47.2k
func_code_url
stringlengths
85
339
klavinslab/coral
coral/sequence/_dna.py
DNA.ape
def ape(self, ape_path=None): '''Open in ApE if `ApE` is in your command line path.''' # TODO: simplify - make ApE look in PATH only cmd = 'ApE' if ape_path is None: # Check for ApE in PATH ape_executables = [] for path in os.environ['PATH'].split(os.p...
python
def ape(self, ape_path=None): '''Open in ApE if `ApE` is in your command line path.''' # TODO: simplify - make ApE look in PATH only cmd = 'ApE' if ape_path is None: # Check for ApE in PATH ape_executables = [] for path in os.environ['PATH'].split(os.p...
Open in ApE if `ApE` is in your command line path.
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L84-L111
klavinslab/coral
coral/sequence/_dna.py
DNA.copy
def copy(self): '''Create a copy of the current instance. :returns: A safely-editable copy of the current sequence. :rtype: coral.DNA ''' # Significant performance improvements by skipping alphabet check features_copy = [feature.copy() for feature in self.features] ...
python
def copy(self): '''Create a copy of the current instance. :returns: A safely-editable copy of the current sequence. :rtype: coral.DNA ''' # Significant performance improvements by skipping alphabet check features_copy = [feature.copy() for feature in self.features] ...
Create a copy of the current instance. :returns: A safely-editable copy of the current sequence. :rtype: coral.DNA
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L113-L125
klavinslab/coral
coral/sequence/_dna.py
DNA.circularize
def circularize(self): '''Circularize linear DNA. :returns: A circularized version of the current sequence. :rtype: coral.DNA ''' if self.top[-1].seq == '-' and self.bottom[0].seq == '-': raise ValueError('Cannot circularize - termini disconnected.') if self...
python
def circularize(self): '''Circularize linear DNA. :returns: A circularized version of the current sequence. :rtype: coral.DNA ''' if self.top[-1].seq == '-' and self.bottom[0].seq == '-': raise ValueError('Cannot circularize - termini disconnected.') if self...
Circularize linear DNA. :returns: A circularized version of the current sequence. :rtype: coral.DNA
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L127-L143
klavinslab/coral
coral/sequence/_dna.py
DNA.display
def display(self): '''Display a visualization of the sequence in an IPython notebook.''' try: from IPython.display import HTML import uuid except ImportError: raise IPythonDisplayImportError sequence_json = self.json() d3cdn = '//d3js.org/d3....
python
def display(self): '''Display a visualization of the sequence in an IPython notebook.''' try: from IPython.display import HTML import uuid except ImportError: raise IPythonDisplayImportError sequence_json = self.json() d3cdn = '//d3js.org/d3....
Display a visualization of the sequence in an IPython notebook.
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L145-L176
klavinslab/coral
coral/sequence/_dna.py
DNA.excise
def excise(self, feature): '''Removes feature from circular plasmid and linearizes. Automatically reorients at the base just after the feature. This operation is complementary to the .extract() method. :param feature_name: The feature to remove. :type feature_name: coral.Feature...
python
def excise(self, feature): '''Removes feature from circular plasmid and linearizes. Automatically reorients at the base just after the feature. This operation is complementary to the .extract() method. :param feature_name: The feature to remove. :type feature_name: coral.Feature...
Removes feature from circular plasmid and linearizes. Automatically reorients at the base just after the feature. This operation is complementary to the .extract() method. :param feature_name: The feature to remove. :type feature_name: coral.Feature
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L202-L214
klavinslab/coral
coral/sequence/_dna.py
DNA.extract
def extract(self, feature, remove_subfeatures=False): '''Extract a feature from the sequence. This operation is complementary to the .excise() method. :param feature: Feature object. :type feature: coral.sequence.Feature :param remove_subfeatures: Remove all features in the extr...
python
def extract(self, feature, remove_subfeatures=False): '''Extract a feature from the sequence. This operation is complementary to the .excise() method. :param feature: Feature object. :type feature: coral.sequence.Feature :param remove_subfeatures: Remove all features in the extr...
Extract a feature from the sequence. This operation is complementary to the .excise() method. :param feature: Feature object. :type feature: coral.sequence.Feature :param remove_subfeatures: Remove all features in the extracted sequence aside from the ...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L216-L240
klavinslab/coral
coral/sequence/_dna.py
DNA.flip
def flip(self): '''Flip the DNA - swap the top and bottom strands. :returns: Flipped DNA (bottom strand is now top strand, etc.). :rtype: coral.DNA ''' copy = self.copy() copy.top, copy.bottom = copy.bottom, copy.top copy.features = [_flip_feature(f, len(self)) ...
python
def flip(self): '''Flip the DNA - swap the top and bottom strands. :returns: Flipped DNA (bottom strand is now top strand, etc.). :rtype: coral.DNA ''' copy = self.copy() copy.top, copy.bottom = copy.bottom, copy.top copy.features = [_flip_feature(f, len(self)) ...
Flip the DNA - swap the top and bottom strands. :returns: Flipped DNA (bottom strand is now top strand, etc.). :rtype: coral.DNA
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L242-L252
klavinslab/coral
coral/sequence/_dna.py
DNA.linearize
def linearize(self, index=0): '''Linearize circular DNA at an index. :param index: index at which to linearize. :type index: int :returns: A linearized version of the current sequence. :rtype: coral.DNA :raises: ValueError if the input is linear DNA. ''' ...
python
def linearize(self, index=0): '''Linearize circular DNA at an index. :param index: index at which to linearize. :type index: int :returns: A linearized version of the current sequence. :rtype: coral.DNA :raises: ValueError if the input is linear DNA. ''' ...
Linearize circular DNA at an index. :param index: index at which to linearize. :type index: int :returns: A linearized version of the current sequence. :rtype: coral.DNA :raises: ValueError if the input is linear DNA.
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L275-L295
klavinslab/coral
coral/sequence/_dna.py
DNA.locate
def locate(self, pattern): '''Find sequences matching a pattern. For a circular sequence, the search extends over the origin. :param pattern: str or NucleicAcidSequence for which to find matches. :type pattern: str or coral.DNA :returns: A list of top and bottom strand indices o...
python
def locate(self, pattern): '''Find sequences matching a pattern. For a circular sequence, the search extends over the origin. :param pattern: str or NucleicAcidSequence for which to find matches. :type pattern: str or coral.DNA :returns: A list of top and bottom strand indices o...
Find sequences matching a pattern. For a circular sequence, the search extends over the origin. :param pattern: str or NucleicAcidSequence for which to find matches. :type pattern: str or coral.DNA :returns: A list of top and bottom strand indices of matches. :rtype: list of lis...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L297-L313
klavinslab/coral
coral/sequence/_dna.py
DNA.rotate
def rotate(self, n): '''Rotate Sequence by n bases. :param n: Number of bases to rotate. :type n: int :returns: The current sequence reoriented at `index`. :rtype: coral.DNA :raises: ValueError if applied to linear sequence or `index` is negative. ...
python
def rotate(self, n): '''Rotate Sequence by n bases. :param n: Number of bases to rotate. :type n: int :returns: The current sequence reoriented at `index`. :rtype: coral.DNA :raises: ValueError if applied to linear sequence or `index` is negative. ...
Rotate Sequence by n bases. :param n: Number of bases to rotate. :type n: int :returns: The current sequence reoriented at `index`. :rtype: coral.DNA :raises: ValueError if applied to linear sequence or `index` is negative.
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L324-L350
klavinslab/coral
coral/sequence/_dna.py
DNA.reverse_complement
def reverse_complement(self): '''Reverse complement the DNA. :returns: A reverse-complemented instance of the current sequence. :rtype: coral.DNA ''' copy = self.copy() # Note: if sequence is double-stranded, swapping strand is basically # (but not entirely) the...
python
def reverse_complement(self): '''Reverse complement the DNA. :returns: A reverse-complemented instance of the current sequence. :rtype: coral.DNA ''' copy = self.copy() # Note: if sequence is double-stranded, swapping strand is basically # (but not entirely) the...
Reverse complement the DNA. :returns: A reverse-complemented instance of the current sequence. :rtype: coral.DNA
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L379-L395
klavinslab/coral
coral/sequence/_dna.py
DNA.select_features
def select_features(self, term, by='name', fuzzy=False): '''Select features from the features list based on feature name, gene, or locus tag. :param term: Search term. :type term: str :param by: Feature attribute to search by. Options are 'name', 'gene', an...
python
def select_features(self, term, by='name', fuzzy=False): '''Select features from the features list based on feature name, gene, or locus tag. :param term: Search term. :type term: str :param by: Feature attribute to search by. Options are 'name', 'gene', an...
Select features from the features list based on feature name, gene, or locus tag. :param term: Search term. :type term: str :param by: Feature attribute to search by. Options are 'name', 'gene', and 'locus_tag'. :type by: str :param fuzzy: If ...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L397-L424
klavinslab/coral
coral/sequence/_dna.py
DNA.to_feature
def to_feature(self, name=None, feature_type='misc_feature'): '''Create a feature from the current object. :param name: Name for the new feature. Must be specified if the DNA instance has no .name attribute. :type name: str :param feature_type: The type of feature (...
python
def to_feature(self, name=None, feature_type='misc_feature'): '''Create a feature from the current object. :param name: Name for the new feature. Must be specified if the DNA instance has no .name attribute. :type name: str :param feature_type: The type of feature (...
Create a feature from the current object. :param name: Name for the new feature. Must be specified if the DNA instance has no .name attribute. :type name: str :param feature_type: The type of feature (genbank standard). :type feature_type: str
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L436-L452
klavinslab/coral
coral/sequence/_dna.py
RestrictionSite.cuts_outside
def cuts_outside(self): '''Report whether the enzyme cuts outside its recognition site. Cutting at the very end of the site returns True. :returns: Whether the enzyme will cut outside its recognition site. :rtype: bool ''' for index in self.cut_site: if inde...
python
def cuts_outside(self): '''Report whether the enzyme cuts outside its recognition site. Cutting at the very end of the site returns True. :returns: Whether the enzyme will cut outside its recognition site. :rtype: bool ''' for index in self.cut_site: if inde...
Report whether the enzyme cuts outside its recognition site. Cutting at the very end of the site returns True. :returns: Whether the enzyme will cut outside its recognition site. :rtype: bool
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L787-L798
klavinslab/coral
coral/sequence/_dna.py
Primer.copy
def copy(self): '''Generate a Primer copy. :returns: A safely-editable copy of the current primer. :rtype: coral.DNA ''' return type(self)(self.anneal, self.tm, overhang=self.overhang, name=self.name, note=self.note)
python
def copy(self): '''Generate a Primer copy. :returns: A safely-editable copy of the current primer. :rtype: coral.DNA ''' return type(self)(self.anneal, self.tm, overhang=self.overhang, name=self.name, note=self.note)
Generate a Primer copy. :returns: A safely-editable copy of the current primer. :rtype: coral.DNA
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_dna.py#L886-L894
klavinslab/coral
coral/analysis/_sequence/melting_temp.py
tm
def tm(seq, dna_conc=50, salt_conc=50, parameters='cloning'): '''Calculate nearest-neighbor melting temperature (Tm). :param seq: Sequence for which to calculate the tm. :type seq: coral.DNA :param dna_conc: DNA concentration in nM. :type dna_conc: float :param salt_conc: Salt concentration in ...
python
def tm(seq, dna_conc=50, salt_conc=50, parameters='cloning'): '''Calculate nearest-neighbor melting temperature (Tm). :param seq: Sequence for which to calculate the tm. :type seq: coral.DNA :param dna_conc: DNA concentration in nM. :type dna_conc: float :param salt_conc: Salt concentration in ...
Calculate nearest-neighbor melting temperature (Tm). :param seq: Sequence for which to calculate the tm. :type seq: coral.DNA :param dna_conc: DNA concentration in nM. :type dna_conc: float :param salt_conc: Salt concentration in mM. :type salt_conc: float :param parameters: Nearest-neighbo...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/analysis/_sequence/melting_temp.py#L22-L144
klavinslab/coral
coral/analysis/_sequence/melting_temp.py
_pair_deltas
def _pair_deltas(seq, pars): '''Add up nearest-neighbor parameters for a given sequence. :param seq: DNA sequence for which to sum nearest neighbors :type seq: str :param pars: parameter set to use :type pars: dict :returns: nearest-neighbor delta_H and delta_S sums. :rtype: tuple of floats...
python
def _pair_deltas(seq, pars): '''Add up nearest-neighbor parameters for a given sequence. :param seq: DNA sequence for which to sum nearest neighbors :type seq: str :param pars: parameter set to use :type pars: dict :returns: nearest-neighbor delta_H and delta_S sums. :rtype: tuple of floats...
Add up nearest-neighbor parameters for a given sequence. :param seq: DNA sequence for which to sum nearest neighbors :type seq: str :param pars: parameter set to use :type pars: dict :returns: nearest-neighbor delta_H and delta_S sums. :rtype: tuple of floats
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/analysis/_sequence/melting_temp.py#L147-L164
klavinslab/coral
coral/analysis/_sequence/melting_temp.py
breslauer_corrections
def breslauer_corrections(seq, pars_error): '''Sum corrections for Breslauer '84 method. :param seq: sequence for which to calculate corrections. :type seq: str :param pars_error: dictionary of error corrections :type pars_error: dict :returns: Corrected delta_H and delta_S parameters :rtyp...
python
def breslauer_corrections(seq, pars_error): '''Sum corrections for Breslauer '84 method. :param seq: sequence for which to calculate corrections. :type seq: str :param pars_error: dictionary of error corrections :type pars_error: dict :returns: Corrected delta_H and delta_S parameters :rtyp...
Sum corrections for Breslauer '84 method. :param seq: sequence for which to calculate corrections. :type seq: str :param pars_error: dictionary of error corrections :type pars_error: dict :returns: Corrected delta_H and delta_S parameters :rtype: list of floats
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/analysis/_sequence/melting_temp.py#L167-L193
klavinslab/coral
coral/analysis/_sequence/melting_temp.py
santalucia98_corrections
def santalucia98_corrections(seq, pars_error): '''Sum corrections for SantaLucia '98 method (unified parameters). :param seq: sequence for which to calculate corrections. :type seq: str :param pars_error: dictionary of error corrections :type pars_error: dict :returns: Corrected delta_H and del...
python
def santalucia98_corrections(seq, pars_error): '''Sum corrections for SantaLucia '98 method (unified parameters). :param seq: sequence for which to calculate corrections. :type seq: str :param pars_error: dictionary of error corrections :type pars_error: dict :returns: Corrected delta_H and del...
Sum corrections for SantaLucia '98 method (unified parameters). :param seq: sequence for which to calculate corrections. :type seq: str :param pars_error: dictionary of error corrections :type pars_error: dict :returns: Corrected delta_H and delta_S parameters :rtype: list of floats
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/analysis/_sequence/melting_temp.py#L196-L225
klavinslab/coral
coral/analysis/_sequencing/mafft.py
MAFFT
def MAFFT(sequences, gap_open=1.53, gap_extension=0.0, retree=2): '''A Coral wrapper for the MAFFT command line multiple sequence aligner. :param sequences: A list of sequences to align. :type sequences: List of homogeneous sequences (all DNA, or all RNA, etc.) :param gap_open: --o...
python
def MAFFT(sequences, gap_open=1.53, gap_extension=0.0, retree=2): '''A Coral wrapper for the MAFFT command line multiple sequence aligner. :param sequences: A list of sequences to align. :type sequences: List of homogeneous sequences (all DNA, or all RNA, etc.) :param gap_open: --o...
A Coral wrapper for the MAFFT command line multiple sequence aligner. :param sequences: A list of sequences to align. :type sequences: List of homogeneous sequences (all DNA, or all RNA, etc.) :param gap_open: --op (gap open) penalty in MAFFT cli. :type gap_open: float :param g...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/analysis/_sequencing/mafft.py#L9-L55
klavinslab/coral
coral/analysis/_sequence/repeats.py
repeats
def repeats(seq, size): '''Count times that a sequence of a certain size is repeated. :param seq: Input sequence. :type seq: coral.DNA or coral.RNA :param size: Size of the repeat to count. :type size: int :returns: Occurrences of repeats and how many :rtype: tuple of the matched sequence a...
python
def repeats(seq, size): '''Count times that a sequence of a certain size is repeated. :param seq: Input sequence. :type seq: coral.DNA or coral.RNA :param size: Size of the repeat to count. :type size: int :returns: Occurrences of repeats and how many :rtype: tuple of the matched sequence a...
Count times that a sequence of a certain size is repeated. :param seq: Input sequence. :type seq: coral.DNA or coral.RNA :param size: Size of the repeat to count. :type size: int :returns: Occurrences of repeats and how many :rtype: tuple of the matched sequence and how many times it occurs
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/analysis/_sequence/repeats.py#L5-L22
klavinslab/coral
coral/reaction/_gibson.py
gibson
def gibson(seq_list, linear=False, homology=10, tm=63.0): '''Simulate a Gibson reaction. :param seq_list: list of DNA sequences to Gibson :type seq_list: list of coral.DNA :param linear: Attempt to produce linear, rather than circular, fragment from input fragments. :type linear:...
python
def gibson(seq_list, linear=False, homology=10, tm=63.0): '''Simulate a Gibson reaction. :param seq_list: list of DNA sequences to Gibson :type seq_list: list of coral.DNA :param linear: Attempt to produce linear, rather than circular, fragment from input fragments. :type linear:...
Simulate a Gibson reaction. :param seq_list: list of DNA sequences to Gibson :type seq_list: list of coral.DNA :param linear: Attempt to produce linear, rather than circular, fragment from input fragments. :type linear: bool :param homology_min: minimum bp of homology allowed ...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/reaction/_gibson.py#L21-L60
klavinslab/coral
coral/reaction/_gibson.py
_find_fuse_next
def _find_fuse_next(working_list, homology, tm): '''Find the next sequence to fuse, and fuse it (or raise exception). :param homology: length of terminal homology in bp :type homology: int :raises: AmbiguousGibsonError if there is more than one way for the fragment ends to combine. ...
python
def _find_fuse_next(working_list, homology, tm): '''Find the next sequence to fuse, and fuse it (or raise exception). :param homology: length of terminal homology in bp :type homology: int :raises: AmbiguousGibsonError if there is more than one way for the fragment ends to combine. ...
Find the next sequence to fuse, and fuse it (or raise exception). :param homology: length of terminal homology in bp :type homology: int :raises: AmbiguousGibsonError if there is more than one way for the fragment ends to combine. GibsonOverlapError if no homology match can be fou...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/reaction/_gibson.py#L87-L150
klavinslab/coral
coral/reaction/_gibson.py
_fuse_last
def _fuse_last(working_list, homology, tm): '''With one sequence left, attempt to fuse it to itself. :param homology: length of terminal homology in bp. :type homology: int :raises: AmbiguousGibsonError if either of the termini are palindromic (would bind self-self). ValueErro...
python
def _fuse_last(working_list, homology, tm): '''With one sequence left, attempt to fuse it to itself. :param homology: length of terminal homology in bp. :type homology: int :raises: AmbiguousGibsonError if either of the termini are palindromic (would bind self-self). ValueErro...
With one sequence left, attempt to fuse it to itself. :param homology: length of terminal homology in bp. :type homology: int :raises: AmbiguousGibsonError if either of the termini are palindromic (would bind self-self). ValueError if the ends are not compatible.
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/reaction/_gibson.py#L153-L191
klavinslab/coral
coral/reaction/_gibson.py
homology_report
def homology_report(seq1, seq2, strand1, strand2, cutoff=0, min_tm=63.0, top_two=False, max_size=500): '''Given two sequences (seq1 and seq2), report the size of all perfect matches between the 3' end of the top strand of seq1 and the 3' end of either strand of seq2. In short, in a Gibso...
python
def homology_report(seq1, seq2, strand1, strand2, cutoff=0, min_tm=63.0, top_two=False, max_size=500): '''Given two sequences (seq1 and seq2), report the size of all perfect matches between the 3' end of the top strand of seq1 and the 3' end of either strand of seq2. In short, in a Gibso...
Given two sequences (seq1 and seq2), report the size of all perfect matches between the 3' end of the top strand of seq1 and the 3' end of either strand of seq2. In short, in a Gibson reaction, what would bind the desired part of seq1, given a seq2? :param seq1: Sequence for which to test 3\' binding o...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/reaction/_gibson.py#L194-L270
klavinslab/coral
coral/database/_yeast.py
fetch_yeast_locus_sequence
def fetch_yeast_locus_sequence(locus_name, flanking_size=0): '''Acquire a sequence from SGD http://www.yeastgenome.org. :param locus_name: Common name or systematic name for the locus (e.g. ACT1 or YFL039C). :type locus_name: str :param flanking_size: The length of flanking DNA (...
python
def fetch_yeast_locus_sequence(locus_name, flanking_size=0): '''Acquire a sequence from SGD http://www.yeastgenome.org. :param locus_name: Common name or systematic name for the locus (e.g. ACT1 or YFL039C). :type locus_name: str :param flanking_size: The length of flanking DNA (...
Acquire a sequence from SGD http://www.yeastgenome.org. :param locus_name: Common name or systematic name for the locus (e.g. ACT1 or YFL039C). :type locus_name: str :param flanking_size: The length of flanking DNA (on each side) to return :type flanking_size: int
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/database/_yeast.py#L6-L83
klavinslab/coral
coral/database/_yeast.py
get_yeast_sequence
def get_yeast_sequence(chromosome, start, end, reverse_complement=False): '''Acquire a sequence from SGD http://www.yeastgenome.org :param chromosome: Yeast chromosome. :type chromosome: int :param start: A biostart. :type start: int :param end: A bioend. :type end: int :param reverse_co...
python
def get_yeast_sequence(chromosome, start, end, reverse_complement=False): '''Acquire a sequence from SGD http://www.yeastgenome.org :param chromosome: Yeast chromosome. :type chromosome: int :param start: A biostart. :type start: int :param end: A bioend. :type end: int :param reverse_co...
Acquire a sequence from SGD http://www.yeastgenome.org :param chromosome: Yeast chromosome. :type chromosome: int :param start: A biostart. :type start: int :param end: A bioend. :type end: int :param reverse_complement: Get the reverse complement. :type revervse_complement: bool :re...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/database/_yeast.py#L86-L126
klavinslab/coral
coral/database/_yeast.py
get_yeast_gene_location
def get_yeast_gene_location(gene_name): '''Acquire the location of a gene from SGD http://www.yeastgenome.org :param gene_name: Name of the gene. :type gene_name: string :returns location: [int: chromosome, int:biostart, int:bioend, int:strand] :rtype location: list ''' from intermine.webse...
python
def get_yeast_gene_location(gene_name): '''Acquire the location of a gene from SGD http://www.yeastgenome.org :param gene_name: Name of the gene. :type gene_name: string :returns location: [int: chromosome, int:biostart, int:bioend, int:strand] :rtype location: list ''' from intermine.webse...
Acquire the location of a gene from SGD http://www.yeastgenome.org :param gene_name: Name of the gene. :type gene_name: string :returns location: [int: chromosome, int:biostart, int:bioend, int:strand] :rtype location: list
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/database/_yeast.py#L129-L182
klavinslab/coral
coral/database/_yeast.py
get_gene_id
def get_gene_id(gene_name): '''Retrieve systematic yeast gene name from the common name. :param gene_name: Common name for yeast gene (e.g. ADE2). :type gene_name: str :returns: Systematic name for yeast gene (e.g. YOR128C). :rtype: str ''' from intermine.webservice import Service ser...
python
def get_gene_id(gene_name): '''Retrieve systematic yeast gene name from the common name. :param gene_name: Common name for yeast gene (e.g. ADE2). :type gene_name: str :returns: Systematic name for yeast gene (e.g. YOR128C). :rtype: str ''' from intermine.webservice import Service ser...
Retrieve systematic yeast gene name from the common name. :param gene_name: Common name for yeast gene (e.g. ADE2). :type gene_name: str :returns: Systematic name for yeast gene (e.g. YOR128C). :rtype: str
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/database/_yeast.py#L185-L219
klavinslab/coral
coral/database/_yeast.py
get_yeast_promoter_ypa
def get_yeast_promoter_ypa(gene_name): '''Retrieve promoter from Yeast Promoter Atlas (http://ypa.csbb.ntu.edu.tw). :param gene_name: Common name for yeast gene. :type gene_name: str :returns: Double-stranded DNA sequence of the promoter. :rtype: coral.DNA ''' import requests loc ...
python
def get_yeast_promoter_ypa(gene_name): '''Retrieve promoter from Yeast Promoter Atlas (http://ypa.csbb.ntu.edu.tw). :param gene_name: Common name for yeast gene. :type gene_name: str :returns: Double-stranded DNA sequence of the promoter. :rtype: coral.DNA ''' import requests loc ...
Retrieve promoter from Yeast Promoter Atlas (http://ypa.csbb.ntu.edu.tw). :param gene_name: Common name for yeast gene. :type gene_name: str :returns: Double-stranded DNA sequence of the promoter. :rtype: coral.DNA
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/database/_yeast.py#L222-L259
klavinslab/coral
coral/design/_oligo_synthesis/oligo_assembly.py
_grow_overlaps
def _grow_overlaps(dna, melting_temp, require_even, length_max, overlap_min, min_exception): '''Grows equidistant overlaps until they meet specified constraints. :param dna: Input sequence. :type dna: coral.DNA :param melting_temp: Ideal Tm of the overlaps, in degrees C. :type me...
python
def _grow_overlaps(dna, melting_temp, require_even, length_max, overlap_min, min_exception): '''Grows equidistant overlaps until they meet specified constraints. :param dna: Input sequence. :type dna: coral.DNA :param melting_temp: Ideal Tm of the overlaps, in degrees C. :type me...
Grows equidistant overlaps until they meet specified constraints. :param dna: Input sequence. :type dna: coral.DNA :param melting_temp: Ideal Tm of the overlaps, in degrees C. :type melting_temp: float :param require_even: Require that the number of oligonucleotides is even. :type require_even:...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/design/_oligo_synthesis/oligo_assembly.py#L215-L347
klavinslab/coral
coral/design/_oligo_synthesis/oligo_assembly.py
_recalculate_overlaps
def _recalculate_overlaps(dna, overlaps, oligo_indices): '''Recalculate overlap sequences based on the current overlap indices. :param dna: Sequence being split into oligos. :type dna: coral.DNA :param overlaps: Current overlaps - a list of DNA sequences. :type overlaps: coral.DNA list :param o...
python
def _recalculate_overlaps(dna, overlaps, oligo_indices): '''Recalculate overlap sequences based on the current overlap indices. :param dna: Sequence being split into oligos. :type dna: coral.DNA :param overlaps: Current overlaps - a list of DNA sequences. :type overlaps: coral.DNA list :param o...
Recalculate overlap sequences based on the current overlap indices. :param dna: Sequence being split into oligos. :type dna: coral.DNA :param overlaps: Current overlaps - a list of DNA sequences. :type overlaps: coral.DNA list :param oligo_indices: List of oligo indices (starts and stops). :typ...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/design/_oligo_synthesis/oligo_assembly.py#L350-L369
klavinslab/coral
coral/design/_oligo_synthesis/oligo_assembly.py
_expand_overlap
def _expand_overlap(dna, oligo_indices, index, oligos, length_max): '''Given an overlap to increase, increases smaller oligo. :param dna: Sequence being split into oligos. :type dna: coral.DNA :param oligo_indices: index of oligo starts and stops :type oligo_indices: list :param index: index of...
python
def _expand_overlap(dna, oligo_indices, index, oligos, length_max): '''Given an overlap to increase, increases smaller oligo. :param dna: Sequence being split into oligos. :type dna: coral.DNA :param oligo_indices: index of oligo starts and stops :type oligo_indices: list :param index: index of...
Given an overlap to increase, increases smaller oligo. :param dna: Sequence being split into oligos. :type dna: coral.DNA :param oligo_indices: index of oligo starts and stops :type oligo_indices: list :param index: index of the oligo :type index: int :param left_len: length of left oligo ...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/design/_oligo_synthesis/oligo_assembly.py#L372-L409
klavinslab/coral
coral/design/_oligo_synthesis/oligo_assembly.py
_adjust_overlap
def _adjust_overlap(positions_list, index, direction): '''Increase overlap to the right or left of an index. :param positions_list: list of overlap positions :type positions_list: list :param index: index of the overlap to increase. :type index: int :param direction: which side of the overlap t...
python
def _adjust_overlap(positions_list, index, direction): '''Increase overlap to the right or left of an index. :param positions_list: list of overlap positions :type positions_list: list :param index: index of the overlap to increase. :type index: int :param direction: which side of the overlap t...
Increase overlap to the right or left of an index. :param positions_list: list of overlap positions :type positions_list: list :param index: index of the overlap to increase. :type index: int :param direction: which side of the overlap to increase - left or right. :type direction: str :retu...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/design/_oligo_synthesis/oligo_assembly.py#L412-L432
klavinslab/coral
coral/design/_oligo_synthesis/oligo_assembly.py
OligoAssembly.design_assembly
def design_assembly(self): '''Design the overlapping oligos. :returns: Assembly oligos, and the sequences, Tms, and indices of their overlapping regions. :rtype: dict ''' # Input parameters needed to design the oligos length_range = self.kwargs['length...
python
def design_assembly(self): '''Design the overlapping oligos. :returns: Assembly oligos, and the sequences, Tms, and indices of their overlapping regions. :rtype: dict ''' # Input parameters needed to design the oligos length_range = self.kwargs['length...
Design the overlapping oligos. :returns: Assembly oligos, and the sequences, Tms, and indices of their overlapping regions. :rtype: dict
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/design/_oligo_synthesis/oligo_assembly.py#L57-L145
klavinslab/coral
coral/design/_oligo_synthesis/oligo_assembly.py
OligoAssembly.primers
def primers(self, tm=60): '''Design primers for amplifying the assembled sequence. :param tm: melting temperature (lower than overlaps is best). :type tm: float :returns: Primer list (the output of coral.design.primers). :rtype: list ''' self.primers = coral.des...
python
def primers(self, tm=60): '''Design primers for amplifying the assembled sequence. :param tm: melting temperature (lower than overlaps is best). :type tm: float :returns: Primer list (the output of coral.design.primers). :rtype: list ''' self.primers = coral.des...
Design primers for amplifying the assembled sequence. :param tm: melting temperature (lower than overlaps is best). :type tm: float :returns: Primer list (the output of coral.design.primers). :rtype: list
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/design/_oligo_synthesis/oligo_assembly.py#L147-L157
klavinslab/coral
coral/design/_oligo_synthesis/oligo_assembly.py
OligoAssembly.write
def write(self, path): '''Write assembly oligos and (if applicable) primers to csv. :param path: path to csv file, including .csv extension. :type path: str ''' with open(path, 'wb') as oligo_file: oligo_writer = csv.writer(oligo_file, delimiter=',', ...
python
def write(self, path): '''Write assembly oligos and (if applicable) primers to csv. :param path: path to csv file, including .csv extension. :type path: str ''' with open(path, 'wb') as oligo_file: oligo_writer = csv.writer(oligo_file, delimiter=',', ...
Write assembly oligos and (if applicable) primers to csv. :param path: path to csv file, including .csv extension. :type path: str
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/design/_oligo_synthesis/oligo_assembly.py#L159-L184
klavinslab/coral
coral/design/_oligo_synthesis/oligo_assembly.py
OligoAssembly.write_map
def write_map(self, path): '''Write genbank map that highlights overlaps. :param path: full path to .gb file to write. :type path: str ''' starts = [index[0] for index in self.overlap_indices] features = [] for i, start in enumerate(starts): stop = s...
python
def write_map(self, path): '''Write genbank map that highlights overlaps. :param path: full path to .gb file to write. :type path: str ''' starts = [index[0] for index in self.overlap_indices] features = [] for i, start in enumerate(starts): stop = s...
Write genbank map that highlights overlaps. :param path: full path to .gb file to write. :type path: str
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/design/_oligo_synthesis/oligo_assembly.py#L186-L203
klavinslab/coral
coral/reaction/_central_dogma.py
coding_sequence
def coding_sequence(rna): '''Extract coding sequence from an RNA template. :param seq: Sequence from which to extract a coding sequence. :type seq: coral.RNA :param material: Type of sequence ('dna' or 'rna') :type material: str :returns: The first coding sequence (start codon -> stop codon) ma...
python
def coding_sequence(rna): '''Extract coding sequence from an RNA template. :param seq: Sequence from which to extract a coding sequence. :type seq: coral.RNA :param material: Type of sequence ('dna' or 'rna') :type material: str :returns: The first coding sequence (start codon -> stop codon) ma...
Extract coding sequence from an RNA template. :param seq: Sequence from which to extract a coding sequence. :type seq: coral.RNA :param material: Type of sequence ('dna' or 'rna') :type material: str :returns: The first coding sequence (start codon -> stop codon) matched from 5' to 3'...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/reaction/_central_dogma.py#L42-L86
klavinslab/coral
coral/database/_rebase.py
Rebase.update
def update(self): '''Update definitions.''' # Download http://rebase.neb.com/rebase/link_withref to tmp self._tmpdir = tempfile.mkdtemp() try: self._rebase_file = self._tmpdir + '/rebase_file' print 'Downloading latest enzyme definitions' url = 'http:/...
python
def update(self): '''Update definitions.''' # Download http://rebase.neb.com/rebase/link_withref to tmp self._tmpdir = tempfile.mkdtemp() try: self._rebase_file = self._tmpdir + '/rebase_file' print 'Downloading latest enzyme definitions' url = 'http:/...
Update definitions.
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/database/_rebase.py#L15-L51
klavinslab/coral
coral/database/_rebase.py
Rebase._process_file
def _process_file(self): '''Process rebase file into dict with name and cut site information.''' print 'Processing file' with open(self._rebase_file, 'r') as f: raw = f.readlines() names = [line.strip()[3:] for line in raw if line.startswith('<1>')] seqs = [line.strip...
python
def _process_file(self): '''Process rebase file into dict with name and cut site information.''' print 'Processing file' with open(self._rebase_file, 'r') as f: raw = f.readlines() names = [line.strip()[3:] for line in raw if line.startswith('<1>')] seqs = [line.strip...
Process rebase file into dict with name and cut site information.
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/database/_rebase.py#L69-L102
klavinslab/coral
coral/sequence/_peptide.py
Peptide.copy
def copy(self): '''Create a copy of the current instance. :returns: A safely editable copy of the current sequence. :rtype: coral.Peptide ''' return type(self)(str(self._sequence), features=self.features, run_checks=False)
python
def copy(self): '''Create a copy of the current instance. :returns: A safely editable copy of the current sequence. :rtype: coral.Peptide ''' return type(self)(str(self._sequence), features=self.features, run_checks=False)
Create a copy of the current instance. :returns: A safely editable copy of the current sequence. :rtype: coral.Peptide
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_peptide.py#L26-L34
klavinslab/coral
coral/utils/tempdirs.py
tempdir
def tempdir(fun): '''For use as a decorator of instance methods - creates a temporary dir named self._tempdir and then deletes it after the method runs. :param fun: function to decorate :type fun: instance method ''' def wrapper(*args, **kwargs): self = args[0] if os.path.isdir...
python
def tempdir(fun): '''For use as a decorator of instance methods - creates a temporary dir named self._tempdir and then deletes it after the method runs. :param fun: function to decorate :type fun: instance method ''' def wrapper(*args, **kwargs): self = args[0] if os.path.isdir...
For use as a decorator of instance methods - creates a temporary dir named self._tempdir and then deletes it after the method runs. :param fun: function to decorate :type fun: instance method
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/utils/tempdirs.py#L9-L30
klavinslab/coral
coral/reaction/utils.py
convert_sequence
def convert_sequence(seq, to_material): '''Translate a DNA sequence into peptide sequence. The following conversions are supported: Transcription (seq is DNA, to_material is 'rna') Reverse transcription (seq is RNA, to_material is 'dna') Translation (seq is RNA, to_material is 'peptide'...
python
def convert_sequence(seq, to_material): '''Translate a DNA sequence into peptide sequence. The following conversions are supported: Transcription (seq is DNA, to_material is 'rna') Reverse transcription (seq is RNA, to_material is 'dna') Translation (seq is RNA, to_material is 'peptide'...
Translate a DNA sequence into peptide sequence. The following conversions are supported: Transcription (seq is DNA, to_material is 'rna') Reverse transcription (seq is RNA, to_material is 'dna') Translation (seq is RNA, to_material is 'peptide') :param seq: DNA or RNA sequence. :ty...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/reaction/utils.py#L6-L70
klavinslab/coral
coral/sequence/_nucleicacid.py
NucleicAcid.gc
def gc(self): '''Find the frequency of G and C in the current sequence.''' gc = len([base for base in self.seq if base == 'C' or base == 'G']) return float(gc) / len(self)
python
def gc(self): '''Find the frequency of G and C in the current sequence.''' gc = len([base for base in self.seq if base == 'C' or base == 'G']) return float(gc) / len(self)
Find the frequency of G and C in the current sequence.
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_nucleicacid.py#L58-L61
klavinslab/coral
coral/sequence/_nucleicacid.py
NucleicAcid.is_rotation
def is_rotation(self, other): '''Determine whether two sequences are the same, just at different rotations. :param other: The sequence to check for rotational equality. :type other: coral.sequence._sequence.Sequence ''' if len(self) != len(other): return Fal...
python
def is_rotation(self, other): '''Determine whether two sequences are the same, just at different rotations. :param other: The sequence to check for rotational equality. :type other: coral.sequence._sequence.Sequence ''' if len(self) != len(other): return Fal...
Determine whether two sequences are the same, just at different rotations. :param other: The sequence to check for rotational equality. :type other: coral.sequence._sequence.Sequence
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_nucleicacid.py#L78-L93
klavinslab/coral
coral/sequence/_nucleicacid.py
NucleicAcid.linearize
def linearize(self, index=0): '''Linearize the Sequence at an index. :param index: index at which to linearize. :type index: int :returns: A linearized version of the current sequence. :rtype: coral.sequence._sequence.Sequence :raises: ValueError if the input is a linear...
python
def linearize(self, index=0): '''Linearize the Sequence at an index. :param index: index at which to linearize. :type index: int :returns: A linearized version of the current sequence. :rtype: coral.sequence._sequence.Sequence :raises: ValueError if the input is a linear...
Linearize the Sequence at an index. :param index: index at which to linearize. :type index: int :returns: A linearized version of the current sequence. :rtype: coral.sequence._sequence.Sequence :raises: ValueError if the input is a linear sequence.
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_nucleicacid.py#L95-L113
klavinslab/coral
coral/sequence/_nucleicacid.py
NucleicAcid.locate
def locate(self, pattern): '''Find sequences matching a pattern. :param pattern: Sequence for which to find matches. :type pattern: str :returns: Indices of pattern matches. :rtype: list of ints ''' if self.circular: if len(pattern) >= 2 * len(self):...
python
def locate(self, pattern): '''Find sequences matching a pattern. :param pattern: Sequence for which to find matches. :type pattern: str :returns: Indices of pattern matches. :rtype: list of ints ''' if self.circular: if len(pattern) >= 2 * len(self):...
Find sequences matching a pattern. :param pattern: Sequence for which to find matches. :type pattern: str :returns: Indices of pattern matches. :rtype: list of ints
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_nucleicacid.py#L115-L131
klavinslab/coral
coral/sequence/_nucleicacid.py
NucleicAcid.mw
def mw(self): '''Calculate the molecular weight. :returns: The molecular weight of the current sequence in amu. :rtype: float ''' counter = collections.Counter(self.seq.lower()) mw_a = counter['a'] * 313.2 mw_t = counter['t'] * 304.2 mw_g = counter['g'] ...
python
def mw(self): '''Calculate the molecular weight. :returns: The molecular weight of the current sequence in amu. :rtype: float ''' counter = collections.Counter(self.seq.lower()) mw_a = counter['a'] * 313.2 mw_t = counter['t'] * 304.2 mw_g = counter['g'] ...
Calculate the molecular weight. :returns: The molecular weight of the current sequence in amu. :rtype: float
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_nucleicacid.py#L133-L150
klavinslab/coral
coral/sequence/_nucleicacid.py
NucleicAcid.rotate
def rotate(self, n): '''Rotate Sequence by n bases. :param n: Number of bases to rotate. :type n: int :returns: The current sequence reoriented at `index`. :rtype: coral.sequence._sequence.Sequence :raises: ValueError if applied to linear sequence or `index` is ...
python
def rotate(self, n): '''Rotate Sequence by n bases. :param n: Number of bases to rotate. :type n: int :returns: The current sequence reoriented at `index`. :rtype: coral.sequence._sequence.Sequence :raises: ValueError if applied to linear sequence or `index` is ...
Rotate Sequence by n bases. :param n: Number of bases to rotate. :type n: int :returns: The current sequence reoriented at `index`. :rtype: coral.sequence._sequence.Sequence :raises: ValueError if applied to linear sequence or `index` is negative.
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/sequence/_nucleicacid.py#L152-L167
klavinslab/coral
coral/reaction/_resect.py
five_resect
def five_resect(dna, n_bases): '''Remove bases from 5' end of top strand. :param dna: Sequence to resect. :type dna: coral.DNA :param n_bases: Number of bases cut back. :type n_bases: int :returns: DNA sequence resected at the 5' end by n_bases. :rtype: coral.DNA ''' new_instance =...
python
def five_resect(dna, n_bases): '''Remove bases from 5' end of top strand. :param dna: Sequence to resect. :type dna: coral.DNA :param n_bases: Number of bases cut back. :type n_bases: int :returns: DNA sequence resected at the 5' end by n_bases. :rtype: coral.DNA ''' new_instance =...
Remove bases from 5' end of top strand. :param dna: Sequence to resect. :type dna: coral.DNA :param n_bases: Number of bases cut back. :type n_bases: int :returns: DNA sequence resected at the 5' end by n_bases. :rtype: coral.DNA
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/reaction/_resect.py#L5-L24
klavinslab/coral
coral/reaction/_resect.py
_remove_end_gaps
def _remove_end_gaps(sequence): '''Removes double-stranded gaps from ends of the sequence. :returns: The current sequence with terminal double-strand gaps ('-') removed. :rtype: coral.DNA ''' # Count terminal blank sequences def count_end_gaps(seq): gap = coral.DNA('-') ...
python
def _remove_end_gaps(sequence): '''Removes double-stranded gaps from ends of the sequence. :returns: The current sequence with terminal double-strand gaps ('-') removed. :rtype: coral.DNA ''' # Count terminal blank sequences def count_end_gaps(seq): gap = coral.DNA('-') ...
Removes double-stranded gaps from ends of the sequence. :returns: The current sequence with terminal double-strand gaps ('-') removed. :rtype: coral.DNA
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/reaction/_resect.py#L49-L78
klavinslab/coral
coral/analysis/_sequencing/needle.py
needle
def needle(reference, query, gap_open=-15, gap_extend=0, matrix=submat.DNA_SIMPLE): '''Do a Needleman-Wunsch alignment. :param reference: Reference sequence. :type reference: coral.DNA :param query: Sequence to align against the reference. :type query: coral.DNA :param gapopen: Penal...
python
def needle(reference, query, gap_open=-15, gap_extend=0, matrix=submat.DNA_SIMPLE): '''Do a Needleman-Wunsch alignment. :param reference: Reference sequence. :type reference: coral.DNA :param query: Sequence to align against the reference. :type query: coral.DNA :param gapopen: Penal...
Do a Needleman-Wunsch alignment. :param reference: Reference sequence. :type reference: coral.DNA :param query: Sequence to align against the reference. :type query: coral.DNA :param gapopen: Penalty for opening a gap. :type gapopen: float :param gapextend: Penalty for extending a gap. ...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/analysis/_sequencing/needle.py#L16-L48
klavinslab/coral
coral/analysis/_sequencing/needle.py
needle_msa
def needle_msa(reference, results, gap_open=-15, gap_extend=0, matrix=submat.DNA_SIMPLE): '''Create a multiple sequence alignment based on aligning every result sequence against the reference, then inserting gaps until every aligned reference is identical ''' gap = '-' # Convert ...
python
def needle_msa(reference, results, gap_open=-15, gap_extend=0, matrix=submat.DNA_SIMPLE): '''Create a multiple sequence alignment based on aligning every result sequence against the reference, then inserting gaps until every aligned reference is identical ''' gap = '-' # Convert ...
Create a multiple sequence alignment based on aligning every result sequence against the reference, then inserting gaps until every aligned reference is identical
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/analysis/_sequencing/needle.py#L58-L113
klavinslab/coral
coral/analysis/_sequencing/needle.py
needle_multi
def needle_multi(references, queries, gap_open=-15, gap_extend=0, matrix=submat.DNA_SIMPLE): '''Batch process of sequencing split over several cores. Acts just like needle but sequence inputs are lists. :param references: References sequence. :type references: coral.DNA list :param...
python
def needle_multi(references, queries, gap_open=-15, gap_extend=0, matrix=submat.DNA_SIMPLE): '''Batch process of sequencing split over several cores. Acts just like needle but sequence inputs are lists. :param references: References sequence. :type references: coral.DNA list :param...
Batch process of sequencing split over several cores. Acts just like needle but sequence inputs are lists. :param references: References sequence. :type references: coral.DNA list :param queries: Sequences to align against the reference. :type queries: coral.DNA list :param gap_open: Penalty fo...
https://github.com/klavinslab/coral/blob/17f59591211562a59a051f474cd6cecba4829df9/coral/analysis/_sequencing/needle.py#L116-L147
WoLpH/python-utils
python_utils/import_.py
import_global
def import_global( name, modules=None, exceptions=DummyException, locals_=None, globals_=None, level=-1): '''Import the requested items into the global scope WARNING! this method _will_ overwrite your global scope If you have a variable named "path" and you call import_global('sys') it ...
python
def import_global( name, modules=None, exceptions=DummyException, locals_=None, globals_=None, level=-1): '''Import the requested items into the global scope WARNING! this method _will_ overwrite your global scope If you have a variable named "path" and you call import_global('sys') it ...
Import the requested items into the global scope WARNING! this method _will_ overwrite your global scope If you have a variable named "path" and you call import_global('sys') it will be overwritten with sys.path Args: name (str): the name of the module to import, e.g. sys modules (str)...
https://github.com/WoLpH/python-utils/blob/6bbe13bab33bd9965b0edd379f26261b31a3e427/python_utils/import_.py#L6-L78
WoLpH/python-utils
python_utils/formatters.py
camel_to_underscore
def camel_to_underscore(name): '''Convert camel case style naming to underscore style naming If there are existing underscores they will be collapsed with the to-be-added underscores. Multiple consecutive capital letters will not be split except for the last one. >>> camel_to_underscore('SpamEggsA...
python
def camel_to_underscore(name): '''Convert camel case style naming to underscore style naming If there are existing underscores they will be collapsed with the to-be-added underscores. Multiple consecutive capital letters will not be split except for the last one. >>> camel_to_underscore('SpamEggsA...
Convert camel case style naming to underscore style naming If there are existing underscores they will be collapsed with the to-be-added underscores. Multiple consecutive capital letters will not be split except for the last one. >>> camel_to_underscore('SpamEggsAndBacon') 'spam_eggs_and_bacon' ...
https://github.com/WoLpH/python-utils/blob/6bbe13bab33bd9965b0edd379f26261b31a3e427/python_utils/formatters.py#L4-L39
WoLpH/python-utils
python_utils/formatters.py
timesince
def timesince(dt, default='just now'): ''' Returns string representing 'time since' e.g. 3 days ago, 5 hours ago etc. >>> now = datetime.datetime.now() >>> timesince(now) 'just now' >>> timesince(now - datetime.timedelta(seconds=1)) '1 second ago' >>> timesince(now - datetime.timede...
python
def timesince(dt, default='just now'): ''' Returns string representing 'time since' e.g. 3 days ago, 5 hours ago etc. >>> now = datetime.datetime.now() >>> timesince(now) 'just now' >>> timesince(now - datetime.timedelta(seconds=1)) '1 second ago' >>> timesince(now - datetime.timede...
Returns string representing 'time since' e.g. 3 days ago, 5 hours ago etc. >>> now = datetime.datetime.now() >>> timesince(now) 'just now' >>> timesince(now - datetime.timedelta(seconds=1)) '1 second ago' >>> timesince(now - datetime.timedelta(seconds=2)) '2 seconds ago' >>> timesin...
https://github.com/WoLpH/python-utils/blob/6bbe13bab33bd9965b0edd379f26261b31a3e427/python_utils/formatters.py#L42-L112
WoLpH/python-utils
python_utils/time.py
timedelta_to_seconds
def timedelta_to_seconds(delta): '''Convert a timedelta to seconds with the microseconds as fraction Note that this method has become largely obsolete with the `timedelta.total_seconds()` method introduced in Python 2.7. >>> from datetime import timedelta >>> '%d' % timedelta_to_seconds(timedelta(...
python
def timedelta_to_seconds(delta): '''Convert a timedelta to seconds with the microseconds as fraction Note that this method has become largely obsolete with the `timedelta.total_seconds()` method introduced in Python 2.7. >>> from datetime import timedelta >>> '%d' % timedelta_to_seconds(timedelta(...
Convert a timedelta to seconds with the microseconds as fraction Note that this method has become largely obsolete with the `timedelta.total_seconds()` method introduced in Python 2.7. >>> from datetime import timedelta >>> '%d' % timedelta_to_seconds(timedelta(days=1)) '86400' >>> '%d' % time...
https://github.com/WoLpH/python-utils/blob/6bbe13bab33bd9965b0edd379f26261b31a3e427/python_utils/time.py#L10-L33
WoLpH/python-utils
python_utils/time.py
format_time
def format_time(timestamp, precision=datetime.timedelta(seconds=1)): '''Formats timedelta/datetime/seconds >>> format_time('1') '0:00:01' >>> format_time(1.234) '0:00:01' >>> format_time(1) '0:00:01' >>> format_time(datetime.datetime(2000, 1, 2, 3, 4, 5, 6)) '2000-01-02 03:04:05' ...
python
def format_time(timestamp, precision=datetime.timedelta(seconds=1)): '''Formats timedelta/datetime/seconds >>> format_time('1') '0:00:01' >>> format_time(1.234) '0:00:01' >>> format_time(1) '0:00:01' >>> format_time(datetime.datetime(2000, 1, 2, 3, 4, 5, 6)) '2000-01-02 03:04:05' ...
Formats timedelta/datetime/seconds >>> format_time('1') '0:00:01' >>> format_time(1.234) '0:00:01' >>> format_time(1) '0:00:01' >>> format_time(datetime.datetime(2000, 1, 2, 3, 4, 5, 6)) '2000-01-02 03:04:05' >>> format_time(datetime.date(2000, 1, 2)) '2000-01-02' >>> format...
https://github.com/WoLpH/python-utils/blob/6bbe13bab33bd9965b0edd379f26261b31a3e427/python_utils/time.py#L36-L97
WoLpH/python-utils
python_utils/terminal.py
get_terminal_size
def get_terminal_size(): # pragma: no cover '''Get the current size of your terminal Multiple returns are not always a good idea, but in this case it greatly simplifies the code so I believe it's justified. It's not the prettiest function but that's never really possible with cross-platform code. ...
python
def get_terminal_size(): # pragma: no cover '''Get the current size of your terminal Multiple returns are not always a good idea, but in this case it greatly simplifies the code so I believe it's justified. It's not the prettiest function but that's never really possible with cross-platform code. ...
Get the current size of your terminal Multiple returns are not always a good idea, but in this case it greatly simplifies the code so I believe it's justified. It's not the prettiest function but that's never really possible with cross-platform code. Returns: width, height: Two integers contai...
https://github.com/WoLpH/python-utils/blob/6bbe13bab33bd9965b0edd379f26261b31a3e427/python_utils/terminal.py#L4-L78
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.AsyncSearchUsers
def AsyncSearchUsers(self, Target): """Asynchronously searches for Skype users. :Parameters: Target : unicode Search target (name or email address). :return: A search identifier. It will be passed along with the results to the `SkypeEvents.AsyncSearchUser...
python
def AsyncSearchUsers(self, Target): """Asynchronously searches for Skype users. :Parameters: Target : unicode Search target (name or email address). :return: A search identifier. It will be passed along with the results to the `SkypeEvents.AsyncSearchUser...
Asynchronously searches for Skype users. :Parameters: Target : unicode Search target (name or email address). :return: A search identifier. It will be passed along with the results to the `SkypeEvents.AsyncSearchUsersFinished` event after the search is completed....
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L376-L394
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.Attach
def Attach(self, Protocol=5, Wait=True): """Establishes a connection to Skype. :Parameters: Protocol : int Minimal Skype protocol version. Wait : bool If set to False, blocks forever until the connection is established. Otherwise, timeouts after t...
python
def Attach(self, Protocol=5, Wait=True): """Establishes a connection to Skype. :Parameters: Protocol : int Minimal Skype protocol version. Wait : bool If set to False, blocks forever until the connection is established. Otherwise, timeouts after t...
Establishes a connection to Skype. :Parameters: Protocol : int Minimal Skype protocol version. Wait : bool If set to False, blocks forever until the connection is established. Otherwise, timeouts after the `Timeout`.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L396-L411
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.Call
def Call(self, Id=0): """Queries a call object. :Parameters: Id : int Call identifier. :return: Call object. :rtype: `call.Call` """ o = Call(self, Id) o.Status # Test if such a call exists. return o
python
def Call(self, Id=0): """Queries a call object. :Parameters: Id : int Call identifier. :return: Call object. :rtype: `call.Call` """ o = Call(self, Id) o.Status # Test if such a call exists. return o
Queries a call object. :Parameters: Id : int Call identifier. :return: Call object. :rtype: `call.Call`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L413-L425
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.ChangeUserStatus
def ChangeUserStatus(self, Status): """Changes the online status for the current user. :Parameters: Status : `enums`.cus* New online status for the user. :note: This function waits until the online status changes. Alternatively, use the `CurrentUserStatus` ...
python
def ChangeUserStatus(self, Status): """Changes the online status for the current user. :Parameters: Status : `enums`.cus* New online status for the user. :note: This function waits until the online status changes. Alternatively, use the `CurrentUserStatus` ...
Changes the online status for the current user. :Parameters: Status : `enums`.cus* New online status for the user. :note: This function waits until the online status changes. Alternatively, use the `CurrentUserStatus` property to perform an immediate change of stat...
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L443-L461
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.Chat
def Chat(self, Name=''): """Queries a chat object. :Parameters: Name : str Chat name. :return: A chat object. :rtype: `chat.Chat` """ o = Chat(self, Name) o.Status # Tests if such a chat really exists. return o
python
def Chat(self, Name=''): """Queries a chat object. :Parameters: Name : str Chat name. :return: A chat object. :rtype: `chat.Chat` """ o = Chat(self, Name) o.Status # Tests if such a chat really exists. return o
Queries a chat object. :Parameters: Name : str Chat name. :return: A chat object. :rtype: `chat.Chat`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L463-L475
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.ClearCallHistory
def ClearCallHistory(self, Username='ALL', Type=chsAllCalls): """Clears the call history. :Parameters: Username : str Skypename of the user. A special value of 'ALL' means that entries of all users should be removed. Type : `enums`.clt* Call type....
python
def ClearCallHistory(self, Username='ALL', Type=chsAllCalls): """Clears the call history. :Parameters: Username : str Skypename of the user. A special value of 'ALL' means that entries of all users should be removed. Type : `enums`.clt* Call type....
Clears the call history. :Parameters: Username : str Skypename of the user. A special value of 'ALL' means that entries of all users should be removed. Type : `enums`.clt* Call type.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L477-L488
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.Command
def Command(self, Command, Reply=u'', Block=False, Timeout=30000, Id=-1): """Creates an API command object. :Parameters: Command : unicode Command string. Reply : unicode Expected reply. By default any reply is accepted (except errors which raise an ...
python
def Command(self, Command, Reply=u'', Block=False, Timeout=30000, Id=-1): """Creates an API command object. :Parameters: Command : unicode Command string. Reply : unicode Expected reply. By default any reply is accepted (except errors which raise an ...
Creates an API command object. :Parameters: Command : unicode Command string. Reply : unicode Expected reply. By default any reply is accepted (except errors which raise an `SkypeError` exception). Block : bool If set to True, `SendC...
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L501-L526
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.Conference
def Conference(self, Id=0): """Queries a call conference object. :Parameters: Id : int Conference Id. :return: A conference object. :rtype: `Conference` """ o = Conference(self, Id) if Id <= 0 or not o.Calls: raise SkypeError(0,...
python
def Conference(self, Id=0): """Queries a call conference object. :Parameters: Id : int Conference Id. :return: A conference object. :rtype: `Conference` """ o = Conference(self, Id) if Id <= 0 or not o.Calls: raise SkypeError(0,...
Queries a call conference object. :Parameters: Id : int Conference Id. :return: A conference object. :rtype: `Conference`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L528-L541
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.CreateChatWith
def CreateChatWith(self, *Usernames): """Creates a chat with one or more users. :Parameters: Usernames : str One or more Skypenames of the users. :return: A chat object :rtype: `Chat` :see: `Chat.AddMembers` """ return Chat(self, chop(self...
python
def CreateChatWith(self, *Usernames): """Creates a chat with one or more users. :Parameters: Usernames : str One or more Skypenames of the users. :return: A chat object :rtype: `Chat` :see: `Chat.AddMembers` """ return Chat(self, chop(self...
Creates a chat with one or more users. :Parameters: Usernames : str One or more Skypenames of the users. :return: A chat object :rtype: `Chat` :see: `Chat.AddMembers`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L555-L567
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.CreateGroup
def CreateGroup(self, GroupName): """Creates a custom contact group. :Parameters: GroupName : unicode Group name. :return: A group object. :rtype: `Group` :see: `DeleteGroup` """ groups = self.CustomGroups self._DoCommand('CREATE G...
python
def CreateGroup(self, GroupName): """Creates a custom contact group. :Parameters: GroupName : unicode Group name. :return: A group object. :rtype: `Group` :see: `DeleteGroup` """ groups = self.CustomGroups self._DoCommand('CREATE G...
Creates a custom contact group. :Parameters: GroupName : unicode Group name. :return: A group object. :rtype: `Group` :see: `DeleteGroup`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L569-L586
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.CreateSms
def CreateSms(self, MessageType, *TargetNumbers): """Creates an SMS message. :Parameters: MessageType : `enums`.smsMessageType* Message type. TargetNumbers : str One or more target SMS numbers. :return: An sms message object. :rtype: `SmsMess...
python
def CreateSms(self, MessageType, *TargetNumbers): """Creates an SMS message. :Parameters: MessageType : `enums`.smsMessageType* Message type. TargetNumbers : str One or more target SMS numbers. :return: An sms message object. :rtype: `SmsMess...
Creates an SMS message. :Parameters: MessageType : `enums`.smsMessageType* Message type. TargetNumbers : str One or more target SMS numbers. :return: An sms message object. :rtype: `SmsMessage`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L588-L600
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.Greeting
def Greeting(self, Username=''): """Queries the greeting used as voicemail. :Parameters: Username : str Skypename of the user. :return: A voicemail object. :rtype: `Voicemail` """ for v in self.Voicemails: if Username and v.PartnerHandl...
python
def Greeting(self, Username=''): """Queries the greeting used as voicemail. :Parameters: Username : str Skypename of the user. :return: A voicemail object. :rtype: `Voicemail` """ for v in self.Voicemails: if Username and v.PartnerHandl...
Queries the greeting used as voicemail. :Parameters: Username : str Skypename of the user. :return: A voicemail object. :rtype: `Voicemail`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L638-L652
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.Message
def Message(self, Id=0): """Queries a chat message object. :Parameters: Id : int Message Id. :return: A chat message object. :rtype: `ChatMessage` """ o = ChatMessage(self, Id) o.Status # Test if such an id is known. return o
python
def Message(self, Id=0): """Queries a chat message object. :Parameters: Id : int Message Id. :return: A chat message object. :rtype: `ChatMessage` """ o = ChatMessage(self, Id) o.Status # Test if such an id is known. return o
Queries a chat message object. :Parameters: Id : int Message Id. :return: A chat message object. :rtype: `ChatMessage`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L654-L666
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.PlaceCall
def PlaceCall(self, *Targets): """Places a call to a single user or creates a conference call. :Parameters: Targets : str One or more call targets. If multiple targets are specified, a conference call is created. The call target can be a Skypename, phone number, or spe...
python
def PlaceCall(self, *Targets): """Places a call to a single user or creates a conference call. :Parameters: Targets : str One or more call targets. If multiple targets are specified, a conference call is created. The call target can be a Skypename, phone number, or spe...
Places a call to a single user or creates a conference call. :Parameters: Targets : str One or more call targets. If multiple targets are specified, a conference call is created. The call target can be a Skypename, phone number, or speed dial code. :return: A call obj...
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L680-L701
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.Property
def Property(self, ObjectType, ObjectId, PropName, Set=None): """Queries/sets the properties of an object. :Parameters: ObjectType : str Object type ('USER', 'CALL', 'CHAT', 'CHATMESSAGE', ...). ObjectId : str Object Id, depends on the object type. ...
python
def Property(self, ObjectType, ObjectId, PropName, Set=None): """Queries/sets the properties of an object. :Parameters: ObjectType : str Object type ('USER', 'CALL', 'CHAT', 'CHATMESSAGE', ...). ObjectId : str Object Id, depends on the object type. ...
Queries/sets the properties of an object. :Parameters: ObjectType : str Object type ('USER', 'CALL', 'CHAT', 'CHATMESSAGE', ...). ObjectId : str Object Id, depends on the object type. PropName : str Name of the property to access. Set ...
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L731-L747
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.SendCommand
def SendCommand(self, Command): """Sends an API command. :Parameters: Command : `Command` Command to send. Use `Command` method to create a command. """ try: self._Api.send_command(Command) except SkypeAPIError: self.ResetCache() ...
python
def SendCommand(self, Command): """Sends an API command. :Parameters: Command : `Command` Command to send. Use `Command` method to create a command. """ try: self._Api.send_command(Command) except SkypeAPIError: self.ResetCache() ...
Sends an API command. :Parameters: Command : `Command` Command to send. Use `Command` method to create a command.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L770-L781
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.SendSms
def SendSms(self, *TargetNumbers, **Properties): """Creates and sends an SMS message. :Parameters: TargetNumbers : str One or more target SMS numbers. Properties Message properties. Properties available are same as `SmsMessage` object properties. :re...
python
def SendSms(self, *TargetNumbers, **Properties): """Creates and sends an SMS message. :Parameters: TargetNumbers : str One or more target SMS numbers. Properties Message properties. Properties available are same as `SmsMessage` object properties. :re...
Creates and sends an SMS message. :Parameters: TargetNumbers : str One or more target SMS numbers. Properties Message properties. Properties available are same as `SmsMessage` object properties. :return: An sms message object. The message is already sent at ...
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L797-L816
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.SendVoicemail
def SendVoicemail(self, Username): """Sends a voicemail to a specified user. :Parameters: Username : str Skypename of the user. :note: Should return a `Voicemail` object. This is not implemented yet. """ if self._Api.protocol >= 6: self._DoComm...
python
def SendVoicemail(self, Username): """Sends a voicemail to a specified user. :Parameters: Username : str Skypename of the user. :note: Should return a `Voicemail` object. This is not implemented yet. """ if self._Api.protocol >= 6: self._DoComm...
Sends a voicemail to a specified user. :Parameters: Username : str Skypename of the user. :note: Should return a `Voicemail` object. This is not implemented yet.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L818-L830
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.User
def User(self, Username=''): """Queries a user object. :Parameters: Username : str Skypename of the user. :return: A user object. :rtype: `user.User` """ if not Username: Username = self.CurrentUserHandle o = User(self, Username...
python
def User(self, Username=''): """Queries a user object. :Parameters: Username : str Skypename of the user. :return: A user object. :rtype: `user.User` """ if not Username: Username = self.CurrentUserHandle o = User(self, Username...
Queries a user object. :Parameters: Username : str Skypename of the user. :return: A user object. :rtype: `user.User`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L832-L846
Skype4Py/Skype4Py
Skype4Py/skype.py
Skype.Voicemail
def Voicemail(self, Id): """Queries the voicemail object. :Parameters: Id : int Voicemail Id. :return: A voicemail object. :rtype: `Voicemail` """ o = Voicemail(self, Id) o.Type # Test if such a voicemail exists. return o
python
def Voicemail(self, Id): """Queries the voicemail object. :Parameters: Id : int Voicemail Id. :return: A voicemail object. :rtype: `Voicemail` """ o = Voicemail(self, Id) o.Type # Test if such a voicemail exists. return o
Queries the voicemail object. :Parameters: Id : int Voicemail Id. :return: A voicemail object. :rtype: `Voicemail`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/skype.py#L862-L874
Skype4Py/Skype4Py
Skype4Py/application.py
Application.Connect
def Connect(self, Username, WaitConnected=False): """Connects application to user. :Parameters: Username : str Name of the user to connect to. WaitConnected : bool If True, causes the method to wait until the connection is established. :return: If ``...
python
def Connect(self, Username, WaitConnected=False): """Connects application to user. :Parameters: Username : str Name of the user to connect to. WaitConnected : bool If True, causes the method to wait until the connection is established. :return: If ``...
Connects application to user. :Parameters: Username : str Name of the user to connect to. WaitConnected : bool If True, causes the method to wait until the connection is established. :return: If ``WaitConnected`` is True, returns the stream which can be used...
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/application.py#L36-L63
Skype4Py/Skype4Py
Skype4Py/application.py
Application.SendDatagram
def SendDatagram(self, Text, Streams=None): """Sends datagram to application streams. :Parameters: Text : unicode Text to send. Streams : sequence of `ApplicationStream` Streams to send the datagram to or None if all currently connected streams should be ...
python
def SendDatagram(self, Text, Streams=None): """Sends datagram to application streams. :Parameters: Text : unicode Text to send. Streams : sequence of `ApplicationStream` Streams to send the datagram to or None if all currently connected streams should be ...
Sends datagram to application streams. :Parameters: Text : unicode Text to send. Streams : sequence of `ApplicationStream` Streams to send the datagram to or None if all currently connected streams should be used.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/application.py#L75-L88
Skype4Py/Skype4Py
Skype4Py/application.py
ApplicationStream.SendDatagram
def SendDatagram(self, Text): """Sends datagram to stream. :Parameters: Text : unicode Datagram to send. """ self.Application._Alter('DATAGRAM', '%s %s' % (self.Handle, tounicode(Text)))
python
def SendDatagram(self, Text): """Sends datagram to stream. :Parameters: Text : unicode Datagram to send. """ self.Application._Alter('DATAGRAM', '%s %s' % (self.Handle, tounicode(Text)))
Sends datagram to stream. :Parameters: Text : unicode Datagram to send.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/application.py#L173-L180
Skype4Py/Skype4Py
Skype4Py/application.py
ApplicationStream.Write
def Write(self, Text): """Writes data to stream. :Parameters: Text : unicode Data to send. """ self.Application._Alter('WRITE', '%s %s' % (self.Handle, tounicode(Text)))
python
def Write(self, Text): """Writes data to stream. :Parameters: Text : unicode Data to send. """ self.Application._Alter('WRITE', '%s %s' % (self.Handle, tounicode(Text)))
Writes data to stream. :Parameters: Text : unicode Data to send.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/application.py#L182-L189
Skype4Py/Skype4Py
Skype4Py/client.py
Client.CreateEvent
def CreateEvent(self, EventId, Caption, Hint): """Creates a custom event displayed in Skype client's events pane. :Parameters: EventId : unicode Unique identifier for the event. Caption : unicode Caption text. Hint : unicode Hint text. S...
python
def CreateEvent(self, EventId, Caption, Hint): """Creates a custom event displayed in Skype client's events pane. :Parameters: EventId : unicode Unique identifier for the event. Caption : unicode Caption text. Hint : unicode Hint text. S...
Creates a custom event displayed in Skype client's events pane. :Parameters: EventId : unicode Unique identifier for the event. Caption : unicode Caption text. Hint : unicode Hint text. Shown when mouse hoovers over the event. :return: ...
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/client.py#L44-L60
Skype4Py/Skype4Py
Skype4Py/client.py
Client.CreateMenuItem
def CreateMenuItem(self, MenuItemId, PluginContext, CaptionText, HintText=u'', IconPath='', Enabled=True, ContactType=pluginContactTypeAll, MultipleContacts=False): """Creates custom menu item in Skype client's "Do More" menus. :Parameters: MenuItemId : unicode ...
python
def CreateMenuItem(self, MenuItemId, PluginContext, CaptionText, HintText=u'', IconPath='', Enabled=True, ContactType=pluginContactTypeAll, MultipleContacts=False): """Creates custom menu item in Skype client's "Do More" menus. :Parameters: MenuItemId : unicode ...
Creates custom menu item in Skype client's "Do More" menus. :Parameters: MenuItemId : unicode Unique identifier for the menu item. PluginContext : `enums`.pluginContext* Menu item context. Allows to choose in which client windows will the menu item appear. ...
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/client.py#L62-L99
Skype4Py/Skype4Py
Skype4Py/client.py
Client.Focus
def Focus(self): """Brings the client window into focus. """ self._Skype._Api.allow_focus(self._Skype.Timeout) self._Skype._DoCommand('FOCUS')
python
def Focus(self): """Brings the client window into focus. """ self._Skype._Api.allow_focus(self._Skype.Timeout) self._Skype._DoCommand('FOCUS')
Brings the client window into focus.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/client.py#L101-L105
Skype4Py/Skype4Py
Skype4Py/client.py
Client.OpenDialog
def OpenDialog(self, Name, *Params): """Open dialog. Use this method to open dialogs added in newer Skype versions if there is no dedicated method in Skype4Py. :Parameters: Name : str Dialog name. Params : unicode One or more optional parameters. ...
python
def OpenDialog(self, Name, *Params): """Open dialog. Use this method to open dialogs added in newer Skype versions if there is no dedicated method in Skype4Py. :Parameters: Name : str Dialog name. Params : unicode One or more optional parameters. ...
Open dialog. Use this method to open dialogs added in newer Skype versions if there is no dedicated method in Skype4Py. :Parameters: Name : str Dialog name. Params : unicode One or more optional parameters.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/client.py#L150-L162
Skype4Py/Skype4Py
Skype4Py/client.py
Client.OpenMessageDialog
def OpenMessageDialog(self, Username, Text=u''): """Opens "Send an IM Message" dialog. :Parameters: Username : str Message target. Text : unicode Message text. """ self.OpenDialog('IM', Username, tounicode(Text))
python
def OpenMessageDialog(self, Username, Text=u''): """Opens "Send an IM Message" dialog. :Parameters: Username : str Message target. Text : unicode Message text. """ self.OpenDialog('IM', Username, tounicode(Text))
Opens "Send an IM Message" dialog. :Parameters: Username : str Message target. Text : unicode Message text.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/client.py#L195-L204
Skype4Py/Skype4Py
Skype4Py/client.py
Client.Start
def Start(self, Minimized=False, Nosplash=False): """Starts Skype application. :Parameters: Minimized : bool If True, Skype is started minimized in system tray. Nosplash : bool If True, no splash screen is displayed upon startup. """ self._Sky...
python
def Start(self, Minimized=False, Nosplash=False): """Starts Skype application. :Parameters: Minimized : bool If True, Skype is started minimized in system tray. Nosplash : bool If True, no splash screen is displayed upon startup. """ self._Sky...
Starts Skype application. :Parameters: Minimized : bool If True, Skype is started minimized in system tray. Nosplash : bool If True, no splash screen is displayed upon startup.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/client.py#L264-L273
Skype4Py/Skype4Py
Skype4Py/api/darwin.py
SkypeAPI.start
def start(self): """ Start the thread associated with this API object. Ensure that the call is made no more than once, to avoid raising a RuntimeError. """ if not self.thread_started: super(SkypeAPI, self).start() self.thread_started = True
python
def start(self): """ Start the thread associated with this API object. Ensure that the call is made no more than once, to avoid raising a RuntimeError. """ if not self.thread_started: super(SkypeAPI, self).start() self.thread_started = True
Start the thread associated with this API object. Ensure that the call is made no more than once, to avoid raising a RuntimeError.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/api/darwin.py#L302-L310
Skype4Py/Skype4Py
Skype4Py/api/posix_x11.py
threads_init
def threads_init(gtk=True): """Enables multithreading support in Xlib and PyGTK. See the module docstring for more info. :Parameters: gtk : bool May be set to False to skip the PyGTK module. """ # enable X11 multithreading x11.XInitThreads() if gtk: from gtk.gdk im...
python
def threads_init(gtk=True): """Enables multithreading support in Xlib and PyGTK. See the module docstring for more info. :Parameters: gtk : bool May be set to False to skip the PyGTK module. """ # enable X11 multithreading x11.XInitThreads() if gtk: from gtk.gdk im...
Enables multithreading support in Xlib and PyGTK. See the module docstring for more info. :Parameters: gtk : bool May be set to False to skip the PyGTK module.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/api/posix_x11.py#L227-L239
Skype4Py/Skype4Py
Skype4Py/api/posix_x11.py
SkypeAPI.get_skype
def get_skype(self): """Returns Skype window ID or None if Skype not running.""" skype_inst = x11.XInternAtom(self.disp, '_SKYPE_INSTANCE', True) if not skype_inst: return type_ret = Atom() format_ret = c_int() nitems_ret = c_ulong() bytes_after_ret = ...
python
def get_skype(self): """Returns Skype window ID or None if Skype not running.""" skype_inst = x11.XInternAtom(self.disp, '_SKYPE_INSTANCE', True) if not skype_inst: return type_ret = Atom() format_ret = c_int() nitems_ret = c_ulong() bytes_after_ret = ...
Returns Skype window ID or None if Skype not running.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/api/posix_x11.py#L323-L337
Skype4Py/Skype4Py
Skype4Py/call.py
Call.Join
def Join(self, Id): """Joins with another call to form a conference. :Parameters: Id : int Call Id of the other call to join to the conference. :return: Conference object. :rtype: `Conference` """ #self._Alter('JOIN_CONFERENCE', Id) reply =...
python
def Join(self, Id): """Joins with another call to form a conference. :Parameters: Id : int Call Id of the other call to join to the conference. :return: Conference object. :rtype: `Conference` """ #self._Alter('JOIN_CONFERENCE', Id) reply =...
Joins with another call to form a conference. :Parameters: Id : int Call Id of the other call to join to the conference. :return: Conference object. :rtype: `Conference`
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/call.py#L175-L188
Skype4Py/Skype4Py
Skype4Py/settings.py
Settings.Avatar
def Avatar(self, Id=1, Set=None): """Sets user avatar picture from file. :Parameters: Id : int Optional avatar Id. Set : str New avatar file name. :deprecated: Use `LoadAvatarFromFile` instead. """ from warnings import warn wa...
python
def Avatar(self, Id=1, Set=None): """Sets user avatar picture from file. :Parameters: Id : int Optional avatar Id. Set : str New avatar file name. :deprecated: Use `LoadAvatarFromFile` instead. """ from warnings import warn wa...
Sets user avatar picture from file. :Parameters: Id : int Optional avatar Id. Set : str New avatar file name. :deprecated: Use `LoadAvatarFromFile` instead.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/settings.py#L25-L40
Skype4Py/Skype4Py
Skype4Py/settings.py
Settings.LoadAvatarFromFile
def LoadAvatarFromFile(self, Filename, AvatarId=1): """Loads user avatar picture from file. :Parameters: Filename : str Name of the avatar file. AvatarId : int Optional avatar Id. """ s = 'AVATAR %s %s' % (AvatarId, path2unicode(Filename)) ...
python
def LoadAvatarFromFile(self, Filename, AvatarId=1): """Loads user avatar picture from file. :Parameters: Filename : str Name of the avatar file. AvatarId : int Optional avatar Id. """ s = 'AVATAR %s %s' % (AvatarId, path2unicode(Filename)) ...
Loads user avatar picture from file. :Parameters: Filename : str Name of the avatar file. AvatarId : int Optional avatar Id.
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/settings.py#L42-L52
Skype4Py/Skype4Py
Skype4Py/settings.py
Settings.RingTone
def RingTone(self, Id=1, Set=None): """Returns/sets a ringtone. :Parameters: Id : int Ringtone Id Set : str Path to new ringtone or None if the current path should be queried. :return: Current path if Set=None, None otherwise. :rtype: str or ...
python
def RingTone(self, Id=1, Set=None): """Returns/sets a ringtone. :Parameters: Id : int Ringtone Id Set : str Path to new ringtone or None if the current path should be queried. :return: Current path if Set=None, None otherwise. :rtype: str or ...
Returns/sets a ringtone. :Parameters: Id : int Ringtone Id Set : str Path to new ringtone or None if the current path should be queried. :return: Current path if Set=None, None otherwise. :rtype: str or None
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/settings.py#L59-L73
Skype4Py/Skype4Py
Skype4Py/settings.py
Settings.RingToneStatus
def RingToneStatus(self, Id=1, Set=None): """Enables/disables a ringtone. :Parameters: Id : int Ringtone Id Set : bool True/False if the ringtone should be enabled/disabled or None if the current status should be queried. :return: Current...
python
def RingToneStatus(self, Id=1, Set=None): """Enables/disables a ringtone. :Parameters: Id : int Ringtone Id Set : bool True/False if the ringtone should be enabled/disabled or None if the current status should be queried. :return: Current...
Enables/disables a ringtone. :Parameters: Id : int Ringtone Id Set : bool True/False if the ringtone should be enabled/disabled or None if the current status should be queried. :return: Current status if Set=None, None otherwise. :rtype: ...
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/settings.py#L75-L90
Skype4Py/Skype4Py
Skype4Py/settings.py
Settings.SaveAvatarToFile
def SaveAvatarToFile(self, Filename, AvatarId=1): """Saves user avatar picture to file. :Parameters: Filename : str Destination path. AvatarId : int Avatar Id """ s = 'AVATAR %s %s' % (AvatarId, path2unicode(Filename)) self._Skype._DoC...
python
def SaveAvatarToFile(self, Filename, AvatarId=1): """Saves user avatar picture to file. :Parameters: Filename : str Destination path. AvatarId : int Avatar Id """ s = 'AVATAR %s %s' % (AvatarId, path2unicode(Filename)) self._Skype._DoC...
Saves user avatar picture to file. :Parameters: Filename : str Destination path. AvatarId : int Avatar Id
https://github.com/Skype4Py/Skype4Py/blob/c48d83f7034109fe46315d45a066126002c6e0d4/Skype4Py/settings.py#L92-L102