Biotools¶
- geneblocks.biotools.annotate_record(seqrecord, location='full', feature_type='feature', margin=0, **qualifiers)[source]¶
Add a feature to a Biopython SeqRecord.
- Parameters:
seqrecord – The biopython seqrecord to be annotated.
location – Either (start, end) or (start, end, strand). (strand defaults to +1)
feature_type – The type associated with the feature
margin – Number of extra bases added on each side of the given location.
qualifiers – Dictionnary that will be the Biopython feature’s qualifiers attribute.
- geneblocks.biotools.random_dna_sequence(length, probas=None, seed=None)[source]¶
Return a random DNA sequence (“ATGGCGT…”) with the specified length.
- Parameters:
length – Length of the DNA sequence.
proba – Frequencies for the different nucleotides, for instance
probas={"A":0.2, "T":0.3, "G":0.3, "C":0.2}
. If not specified, all nucleotides are equiprobable (p=0.25).seed – The seed to feed to the random number generator. When a seed is provided the random results depend deterministically on the seed, thus enabling reproducibility