New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

dnachisel

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dnachisel - pypi Package Compare versions

Comparing version
3.2.10
to
3.2.11
+2
-1
dnachisel.egg-info/PKG-INFO
Metadata-Version: 2.1
Name: dnachisel
Version: 3.2.10
Version: 3.2.11
Summary: Optimize DNA sequences under constraints.

@@ -11,2 +11,3 @@ Home-page: https://github.com/Edinburgh-Genome-Foundry/DnaChisel

Provides-Extra: reports
Provides-Extra: tests
License-File: LICENCE.txt

@@ -13,0 +14,0 @@

@@ -14,1 +14,10 @@ numpy

pandas
[tests]
pytest
pytest-cov
coveralls
geneblocks
genome_collector
matplotlib
primer3-py

@@ -52,2 +52,4 @@ """This module provides useful biological tables as Python dictionaries.

def flatten(l):
return [item for sublist in l for item in sublist]

@@ -63,2 +65,6 @@ def get_backtranslation_table(table_name="Standard"):

back_translation_table["START"] = table.start_codons
back_translation_table["X"] = list(set(flatten(back_translation_table.values())) - set(back_translation_table["*"]))
back_translation_table["B"] = back_translation_table["N"] + back_translation_table["D"]
back_translation_table["J"] = back_translation_table["L"] + back_translation_table["I"]
back_translation_table["Z"] = back_translation_table["E"] + back_translation_table["Q"]
return back_translation_table

@@ -126,3 +126,3 @@ """Generic methods for reading/modifying Genbank/Biopython records"""

new_record = deepcopy(record)
for (start, end) in locations:
for start, end in locations:
annotate_record(

@@ -148,3 +148,3 @@ new_record,

pattern
A DnaChisel SequencePattern object (such as DnaPAttern).
A DNA Chisel SequencePattern object. See SequencePattern documentation.

@@ -151,0 +151,0 @@ feature_type

@@ -18,3 +18,5 @@ """Implement AvoidPattern"""

pattern
A SequencePattern or DnaNotationPattern
A SequencePattern or DnaNotationPattern. If a ``str`` is given, it will
be converted. Note that providing ``size`` may be necessary for certain
patterns. See SequencePattern documentation for more details.

@@ -21,0 +23,0 @@ location

@@ -32,4 +32,5 @@ "Implement AvoidRareCodons."

codon-optimized, which can be provided instead of ``species``. A dict of
the form ``{'*': {"TGA": 0.112, "TAA": 0.68}, 'K': ...}`` giving the RSCU
table (relative usage of each codon). See parameter ``species`` above.
the form ``{'*': {"TGA": 0.112, "TAA": 0.68}, 'K': ...}`` giving the codon
frequency table (relative usage of each codon; frequencies add up to 1,
separately for each amino acid). See parameter ``species`` above.

@@ -36,0 +37,0 @@ location

@@ -58,4 +58,5 @@ from .HarmonizeRCA import HarmonizeRCA

codon-optimized, which can be provided instead of ``species``. A dict of
the form ``{'*': {"TGA": 0.112, "TAA": 0.68}, 'K': ...}`` giving the RSCU
table (relative usage of each codon). See parameter ``species`` above.
the form ``{'*': {"TGA": 0.112, "TAA": 0.68}, 'K': ...}`` giving the codon
frequency table (relative usage of each codon; frequencies add up to 1,
separately for each amino acid). See parameter ``species`` above.

@@ -62,0 +63,0 @@ original_species

@@ -42,4 +42,5 @@ import numpy as np

Optional - can be provided instead of ``species``. A dict of the form
``{'*': {"TGA": 0.112, "TAA": 0.68}, 'K': ...}`` giving the RSCU table
(relative usage of each codon).
``{'*': {"TGA": 0.112, "TAA": 0.68}, 'K': ...}`` giving the codon
frequency table (relative usage of each codon; frequencies add up to 1,
separately for each amino acid).

@@ -54,3 +55,4 @@ original_species

A dict of the form ``{'*': {"TGA": 0.112, "TAA": 0.68}, 'K': ...}``
giving the RSCU table (relative usage of each codon).
giving the codon frequency table (relative usage of each codon;
frequencies add up to 1, separately for each amino acid).

@@ -57,0 +59,0 @@ location

@@ -46,4 +46,5 @@ import numpy as np

A dict of the form ``{'*': {"TGA": 0.112, "TAA": 0.68}, 'K': ...}``
giving the RSCU table (relative usage of each codon). Only provide if
no ``species`` parameter was provided.
giving the codon frequency table (relative usage of each codon;
frequencies add up to 1, separately for each amino acid). Only
provide if no ``species`` parameter was provided.

@@ -50,0 +51,0 @@ boost

@@ -46,4 +46,5 @@ import numpy as np

A dict of the form ``{'*': {"TGA": 0.112, "TAA": 0.68}, 'K': ...}``
giving the RSCU table (relative usage of each codon). Only provide if
no ``species`` parameter was provided.
giving the codon frequency table (relative usage of each codon;
frequencies add up to 1, separately for each amino acid). Only
provide if no ``species`` parameter was provided.

@@ -50,0 +51,0 @@ boost

@@ -25,3 +25,3 @@ """Implement EnforcePatternOccurence"""

A SequencePattern or DnaNotationPattern or a string such as "AATTG",
"BsmBI_site", etc.
"BsmBI_site", etc. See SequencePattern documentation for more details.

@@ -91,3 +91,6 @@ occurences

"""Score the difference between expected and observed n_occurences."""
matches = self.pattern.find_matches(problem.sequence, self.location,)
matches = self.pattern.find_matches(
problem.sequence,
self.location,
)
score = -abs(len(matches) - self.occurences)

@@ -94,0 +97,0 @@

@@ -6,3 +6,6 @@ """Implements the Location class.

"""
from functools import total_ordering
from Bio.SeqFeature import FeatureLocation, SeqFeature
from .biotools import reverse_complement

@@ -12,2 +15,3 @@ from Bio.SeqFeature import SeqFeature, FeatureLocation

@total_ordering
class Location:

@@ -98,5 +102,5 @@ """Represent a segment of a sequence, with a start, end, and strand.

def __geq__(self, other):
"""Greater than."""
return self.to_tuple() >= other.to_tuple()
def __eq__(self, other):
"""Equal to."""
return self.to_tuple() == other.to_tuple()

@@ -126,2 +130,5 @@ def __lt__(self, other):

def __hash__(self):
return hash(self.to_tuple())
@staticmethod

@@ -128,0 +135,0 @@ def merge_overlapping_locations(locations):

@@ -19,3 +19,3 @@ """Implements the SequencePattern, DnaNotationPattern classes.

class SequencePattern:
"""Pattern/ that will be looked for in a DNA sequence.
"""Pattern that will be looked for in a DNA sequence.

@@ -36,18 +36,17 @@ Use this class for matching regular expression patterns, and

expression
Any string or regular expression for matching ATGC nucleotides.
Note that multi-nucleotides symbols such as "N" (for A-T-G-C), or "K"
Any string or regular expression (regex) for matching ATGC nucleotides.
Note that multi-nucleotide symbols such as "N" (for A-T-G-C), or "K"
are not supported by this class, see DnaNotationPattern instead.
size
Size of the pattern, in number of characters (if none provided, the size
of the ``pattern`` string is used).
The ``size`` is used to determine the size of windows when performing
local optimization and constraint solving.
It can be important to provide the size when the
Size of the pattern, in number of characters. The ``size`` is used to
determine the size of windows when performing local optimization and
constraint solving. It can be important to provide the size when the
``pattern`` string provided represents a complex regular expression whose
maximal matching size cannot be easily evaluated.
For example, if a regex is used to actively remove sites, then a size
should be provided to inform DNA Chisel during optimization.
name
Name of the pattern (will be displayed e.g. when the pattern is printed)
Name of the pattern (will be displayed e.g. when the pattern is printed).
"""

@@ -105,7 +104,6 @@

if forced_strand is not None:
subsequence = sequence[location.start: location.end]
subsequence = sequence[location.start : location.end]
if forced_strand == 1:
return [
(loc + location.start)
for loc in self.find_matches(subsequence)
(loc + location.start) for loc in self.find_matches(subsequence)
]

@@ -135,3 +133,3 @@ if forced_strand == -1:

if strand == 0:
matches = self.find_matches(sequence, location, 1)
matches = self.find_matches(sequence, location, 1)
if not self.is_palyndromic:

@@ -165,5 +163,3 @@ matches += self.find_matches(sequence, location, -1)

def __str__(self):
return self.expression + (
"" if self.name is None else " (%s)" % self.name
)
return self.expression + ("" if self.name is None else " (%s)" % self.name)

@@ -170,0 +166,0 @@ @classmethod

@@ -1,1 +0,1 @@

__version__ = "3.2.10"
__version__ = "3.2.11"
Metadata-Version: 2.1
Name: dnachisel
Version: 3.2.10
Version: 3.2.11
Summary: Optimize DNA sequences under constraints.

@@ -11,2 +11,3 @@ Home-page: https://github.com/Edinburgh-Genome-Foundry/DnaChisel

Provides-Extra: reports
Provides-Extra: tests
License-File: LICENCE.txt

@@ -13,0 +14,0 @@

@@ -11,5 +11,5 @@ .. raw:: html

.. image:: https://travis-ci.com/Edinburgh-Genome-Foundry/DnaChisel.svg?branch=master
:target: https://travis-ci.com/Edinburgh-Genome-Foundry/DnaChisel
:alt: Travis CI build status
.. image:: https://github.com/Edinburgh-Genome-Foundry/DnaChisel/actions/workflows/build.yml/badge.svg
:target: https://github.com/Edinburgh-Genome-Foundry/DnaChisel/actions/workflows/build.yml
:alt: GitHub CI build status

@@ -114,6 +114,6 @@ .. image:: https://coveralls.io/repos/github/Edinburgh-Genome-Foundry/DnaChisel/badge.svg?branch=master

By default, only the built-in specifications of DnaChisel can be used in the
By default, only the built-in specifications of DNA Chisel can be used in the
annotations, however it is easy to add your own specifications to the Genbank
parser, and build applications supporting custom specifications on top of
DnaChisel.
DNA Chisel.

@@ -124,6 +124,7 @@

DnaChisel also implements features for verification and troubleshooting. For
DNA Chisel also implements features for verification and troubleshooting. For
instance by generating optimization reports:
.. code:: python
problem = DnaOptimizationProblem(...)

@@ -147,3 +148,3 @@ problem.optimize_with_report(target="report.zip")

DnaChisel hunts down every constraint breach and suboptimal region by
DNA Chisel hunts down every constraint breach and suboptimal region by
recreating local version of the problem around these regions. Each type of

@@ -168,4 +169,5 @@ constraint can be locally *reduced* and solved in its own way, to ensure fast

.. code::
pip install dnachisel # <= minimal install without reports support
pip install dnachisel[reports] # <= full install with all dependencies
pip install 'dnachisel[reports]' # <= full install with all dependencies

@@ -175,3 +177,3 @@ The full installation using ``dnachisel[reports]`` downloads heavier libraries

recommended to use DNA Chisel interactively via Python scripts. Also install
[Geneblocks](https://edinburgh-genome-foundry.github.io/Geneblocks) and its
`GeneBlocks <https://edinburgh-genome-foundry.github.io/Geneblocks>`_ and its
dependencies if you wish to include a plot of sequence edits in the report.

@@ -196,3 +198,3 @@

DnaChisel is an open-source software originally written at the `Edinburgh Genome Foundry
DNA Chisel is an open-source software originally written at the `Edinburgh Genome Foundry
<http://edinburgh-genome-foundry.github.io/home.html>`_ by `Zulko <https://github.com/Zulko>`_

@@ -199,0 +201,0 @@ and `released on Github <https://github.com/Edinburgh-Genome-Foundry/DnaChisel>`_ under the MIT licence (Copyright 2017 Edinburgh Genome Foundry). Everyone is welcome to contribute!

@@ -49,4 +49,13 @@ # This will try to import setuptools. If not here, it will reach for the embedded

"pandas",
]
],
"tests": [
"pytest",
"pytest-cov",
"coveralls",
"geneblocks",
"genome_collector",
"matplotlib",
"primer3-py",
],
},
)