Plastid

Latest version: v0.6.1

Safety actively analyzes 621444 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.6.1

------------------------------

This is a maintenance release meant to leave this package in a reasonable state,
as it is only sporadically maintained.


Added
.....

- Dockerization, to further control test environments, and make this release
release more future-proof. Test environments now include Python 3.6 and 3.9.


Changed
.......

- Bumped minimum requirements to reasonable 2022 standards.

- Upgraded embedded Kent & HTSlib source code

- Clarified licenses


Removed
.......

- Dropped support for Python versions 2.7–3.5. These *might* still run, but
are no longer tested.

- Deprecated classes: ``BPlusTree``, ``RTree``

- Deprecated methods: of ``SegmentChain.get_length()`` and
``SegmentChain.get_masked_length()``

0.5.1

------------------------------

- Updates to package metadata and docs

0.5.0

------------------------------

Changes are predominantly for maintenance, bugfixes, and streamlining.


Changed
.......

- Iterators rewritten for compatibility with Python 3.7 and Python 3.8 (per
instructions in :pep:`479` )

- As a result, **while readers in** :mod:`plastid.readers` **are still
generators, they are no longer their own iterators**. This is a bit of an
obscure point, but implications are:

- they can still be cast to lists::

>>> my_list = list(GTF2_TranscriptAssembler("/path/to/foo.gtf"))

- they can still be used in ``for`` loops::

>>> for my_transcript in GTF2_TranscriptAssembler("/path/to/foo.gtf"):
>>> pass

- they *cannot* be used like this::

>>> transcripts = GTF2_TranscriptAssembler("/path/to/foo.gtf")
>>> a = next(transcripts)
a will be None!!

instead, wrap the reader in `iter` if you want to use them this way::

>>> transcripts = iter(GTF2_TranscriptAssembler("/path/to/foo.gtf"))
>>> a = next(transcripts)
a is now a Transcript


Added
.....

- BioConda support (special thanks to ``lparsons``)

- Testing streamlined via ``tox``, and additional test environments added


Fixed
.....

- Moved calls to ``open()`` into ``with`` context managers to avoid creation of
stale filehandles

- Rewrote ``setup.py`` to remove requirement for pre-installation of
``cython``, ``numpy``, and ``pysam``, as this is now handled by :mod:`pip`

- Removed references to deprecated ``pandas.DataFrame.sort()``, enabling
compatibility with ``pandas`` versions above 0.2.0

- Improved compatibility with ``numpy`` versions above 1.31.1

- ``VariableFivePrimeMapFactory.from_file()`` and
``StratifiedVariableFivePrimeMapFactory.from_file()`` now work on filenames
as well as file handles, as they were supposed to

- ``StratifiedVariableFivePrimeMapFactory`` now imported by typing
``from plastid import *``

- And others as well


Removed
.......

- ``BigBedReader.custom_fields`` was removed in favor of its non-deprecated
alias, ``BigBedReader.extension_fields``

0.4.8

------------------------------

- Fixed a change in `setup.py` that caused Plastid compilation to fail in
Macintosh environments. Sorry Mac users!

0.4.7

------------------------------

This update is minor compared to the release 0.4.6, and was mainly motivated by
updates, bugfixes, and changes required for compatibility with new versions of
``Pysam``


Added
.....

- Support for ``Pysam`` >= 0.10.0

- ``write_pl_table()`` added as a convenience function

- ``--use_mean`` flag added to ``metagene``

- Warnings / better help text


Fixed
.....

- rounding error in ``get_str_from_rgb()``

- ``PSL_Reader()`` now capable of parsing strands from translated `blat` output

- Fixed bug in header parsing in ``PSL_reader``

0.4.6

------------------------------

Highlights

- Support for `BigWig`_ files
- Reimplementation of `BigBed`_ file support
- Simplification of syntax / removal of annoyances in both command-line
scripts and in infrastructure


Added/Changed
.............

File formats
""""""""""""

- Support for `BigWig`_ files. ``BigWigReader`` reads `BigWig`_ files, and
``BigWigGenomeArray`` handles them conveniently.

- ``BigBedReader`` has been reimplemented using Jim Kent's C library, making
it far faster and more memory efficient.

- ``BigBedReader.search()`` created to search indexed fields included in BigBed
files, e.g. to find transcripts with a given `gene_id` (if `gene_id` is included
as an extension column and indexed). To see which fields are searchable,
use ``BigBedReader.indexed_fields``


Infrastructure
""""""""""""""

- Simplified file opening. All readers can now take filenames in addition
to open filehandles. No need to wrap filenames in lists any more.
For example:

.. code-block:: python

old way to open GTF2 file
>>> data = GTF2_TranscriptAssembler(open("some_file.gtf"))

new way. Also works with BED_Reader, GTF2_Reader, GFF3_TranscriptAssembler, and others
>>> data = GTF2_TranscriptAssembler("some_file.gtf")

old way to get read alignments from BAM files
>>> alignments = BAMGenomeArray(["some_file.bam","some_other_file.bam"])

new way
>>> alignemnts = BAMGenomeArray("some_file.bam","some_other_file.bam")

old way to open a tabix-indexed file
>>> data = BED_Reader(pysam.tabix_iterator(open("some_file.bed.gz"),pysam.asTuple()),tabix=True)

new way
>>> data = BED_Reader("some_file.bed.gz",tabix=True)


To maintain backward compatibility, the old syntax still works

- ``BAMGenomeArray`` can now use mapping functions that return multidimensional
arrays. As an example we added ``StratifiedVariableFivePrimeMapFactory``,
which produces a 2D array of counts at each position in a region (columns),
stratified by read length (rows).

- Reformatted & colorized warning output to improve legibility

- ``read_pl_table()`` convenience function for reading tables written
by command-line scripts into DataFrames, preserving headers, formatting,
et c


Command-line scripts
""""""""""""""""""""

- All script output metadata now includes command as executed, for easier
re-running and record keeping

- Scripts using count files get ``--sum`` flag, enabling users to
set effective sum of counts/reads used in normalization and RPKM
calculations

- ``psite``

- ``--constrain`` option added to ``psite`` to improve performance on
noisy or low count data.

- No longer saves intermediate count files. ``--keep`` option added
to take care of this.

- ``metagene``

- Fixed/improved color scaling in heatmap output. Color values are now
capped at the 95th percentile of nonzero values, improving contrast

- Added warnings for files that appear not to contain UTRs

- Like ``psite``, no longer saves intermediate count files. ``--keep``
option added to take care of this.

- ``phase_by_size`` can now optionally use an ROI file from the
``metagene generate`` subprogram. This improves accuracy in higher
eukaryotes by preventing double-counting of codons when more than
one transcript is annotated per gene.

- ``cs chart`` file containing list of genes is now optional. If not given,
all genes are included in comparisons

- ``reformat_transcripts`` is now able to export extended BED columns
(e.g. `gene_id`) if the input data has useful attributes. This particularly
useful when working with large transcript annotations in GTF2/GFF3 format-
they can now be exported to BED format, and converted to BigBed foramt,
allowing random access and low memory usage, while preserving gene-transcript
relationships.


Fixed
.....

- Version parsing bug in setup script.

- ``deprecated`` function decorator now gives ``FutureWarning`` instead
of ``DeprecationWarning``


Deprecated
..........

- ``--norm_region`` option of ``psite`` and ``metagene`` has been deprecated
and will be removed in ``plastid`` v0.5. Instead, use ``--normalize_over``,
which performs the same role, except coordinates are specified relative to the
landmark of interest, rather than entire window. This change is more
intuitive to many users, and saves them mental math. If both ``--norm_region``
and ``--normalize_over`` are specified, ``--normalize_over`` will be used.

- ``BigBedReader.custom_fields`` has been replaced with ``BigBedReader.extension_fields``

- ``BigBedReader.chrom_sizes`` has been replaced with ``BigBedReader.chroms``
for consistency with other data structures

- ``BPlusTree`` and ``RTree`` classes, which will be removed in ``plastid`` v0.5

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.