Skip to main content

MDU Python Tools

CircleCI PyPI - Python Version PyPI PyPI - License

Background

Some simple tools in python for MDU

Tools

mdu-merge-ngs-lanes

Use it to correctly merge lanes from an Illumina run into the a single FASTQ.

Get help:

mdu-merge-ngs-lanes --help

Basic usage:

mdu-merge-ngs-lanes -i /path/to/fastq_folder -o /path/to/output > cmd.sh

Advanced usage:

You can split the output to muliple subfolders of the output folder by adding --subfolder to the command line. The option can be used multiple times, and takes two space separated values as input: path regex. The path gives a name of the subfolder in the output folder, and the regex expression determines which samples go in that subfolder.

For instance, the command below will split samples starting the NTC in to a subfolder called ntc, while all other samples will be added to a subfolder called data.

mdu-merge-ngs-lanes -i /path/to/fastq -o /path/to/output --subfolder 'data' '(?!NTC).*' --subfolder 'ntc' '(?<=NTC).*' > cmd.sh

mdu-sra-uploads

Use to it to upload FASTQ data to NCBI SRA.

Requires a file with tab-separated values of MDU ID and AUSMDUID. For example:

mdu1\tausmdu1

mdu2\tausmdu2

Getting help:

mdu-sra-uploads --help
Usage: mdu-sra-upload [OPTIONS] ISOLATES

Options:
  -f, --folder TEXT         Folder on NCBI to upload. Used to find the reads
                            when submitting via the SRA portal.  [default:
                            mdu]
  -r, --reads-folder TEXT   Where reads are located (uses MDU_READS env
                            variable if available).
  -k, --ascp-key TEXT       Path to ascp ssh upload key (uses ASCP_UPLOAD_KEY
                            env variable if available). This can be obtained
                            from the SRA Submission Portal.
  -s, --sra-subfolder TEXT  SRA subfolder owned by you where data will copied
                            to (uses SRA_SUBFOLDER env variable is available).
  --help                    Show this message and exit.

Basic usage:

cd /path/for/upload
# copy paste isolates.txt
mdu-sra-uploads isolates.txt
# when completing the submission, search for pre-uploaded files in the folder called mdu

Environmental variables that can be used to set options

  • MDU_READS: full path to where FASTQ data is stored
  • ASCP_UPLOAD_KEY: full path to where your Aspera NCBI upload key is located (obtain one from the SRA submission portal under the Aspera command line instructions)
  • SRA_FOLDER: path to your folder at SRA. Usually composed by your email plus an "_" and some random alphanumeric characters. This can be obtained from SRA submission portal under the Aspera command line instructions (e.g., john.doe@doe.industries.com_qEWo9).

Development

Development environment

To develop with the same environment use vagrant and virtualbox:

vagrant up
vagrant ssh

Once logged in to the VM, the shared folder is in /vagrant.

Metadata

Release files for mdu-pytools 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mdu-pytools 0.2.0
File Size Uploaded Provenance
mdu-pytools-0.2.0.tar.gz 5.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mdu-pytools 0.2.0
File Interpreter ABI Platform
mdu_pytools-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / mdu-pytools-0.2.0.tar.gz

Download URL mdu-pytools-0.2.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bcb8d3b745814ef716e6ca28ce222d2a94b5d8d0ed5325cc81ce0a7b48db1860
BLAKE2b-256 checksum
How to use checksums
db078b7fd810c1940879c0aed660ac259d196104e9c2ed8cb167a6d81c53f33a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.4

Release files / mdu_pytools-0.2.0-py3-none-any.whl

Download URL mdu_pytools-0.2.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c141c4e18859e1790561ea89a3fc9c4b3fbefd8093dfe140de9526d0713f25e
BLAKE2b-256 checksum
How to use checksums
674ae2128223c0a56c9c02eda68215935eb08dd31b7a8abf20a60c501b770ebf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.4

Security for mdu-pytools 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page