Skip to main content

Parses outputs of different QC tools and unifies them for the SMaHT portal

Project description

QC parser for SMaHT

Parses outputs of different QC tools and unifies them for the SMaHT portal

Installation

Simply run pip install qc-parser to install the package. You need at least Python 3.8.

To develop this package, clone this repo, make sure poetry is installed on your system and run make install.

Usage

After installation the following command can be run from the command line:

parse-qc \
    -n 'BAM Quality Metrics' \
    --metrics samtools /PATH/samtools.stats.txt \
    --metrics picard_CollectInsertSizeMetrics /PATH/picard_cis_metrics.txt \
    --additional-files /PATH/additional_output_1.pdf \
    --additional-files /PATH/additional_output_2.tsv \
    --output-zip metrics.zip
    --output-json qc_values.json

In this example, the tool will parse the Samtools output file /PATH/samtools.stats.txt and the Picard output file /PATH/picard_cis_metrics.txt. The values that are extracted from both files are specified in src/metrics_to_extract.py. All metrics are combined and stored in qc_values.json that is compatible with Tibanna_ff's generic QC functionality.

The metrics.zip will contain the following files:

samtools.stats.txt
picard_cis_metrics.txt
additional_output_1.pdf
additional_output_2.tsv

The currently supported QC tools are:

  • samtools_stats
  • picard_CollectAlignmentSummaryMetrics
  • picard_CollectInsertSizeMetrics
  • picard_CollectWgsMetrics
  • bamStats.py
  • fastqc
  • rnaseqqc (RNA-SeQC)

Development

If you want to extract a new metric from an already supported QC tool, add the metric to the src/metrics_to_extract.py in the appropriate section.

If you want to add suuport for a new QC tool, you need to add a parser to src/MetricsParser.py and add the metrics you want to extract from the tool to src/metrics_to_extract.py.

Tests

The command make test will run local tests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qc_parser-0.0.10.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qc_parser-0.0.10-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file qc_parser-0.0.10.tar.gz.

File metadata

  • Download URL: qc_parser-0.0.10.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.8.13 Darwin/20.6.0

File hashes

Hashes for qc_parser-0.0.10.tar.gz
Algorithm Hash digest
SHA256 3b4875eb98ba1744761b166d0bed52b2ca78ad3319e02d5be0f8db012ba1d1a3
MD5 743a98ef7d8445505f22369876b3ade1
BLAKE2b-256 e547388218e87fb7254e6827e617e42be1bdf8692e033fbfa7891e42626f2933

See more details on using hashes here.

File details

Details for the file qc_parser-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: qc_parser-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.8.13 Darwin/20.6.0

File hashes

Hashes for qc_parser-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 956d0e0440522270a64b6554c338c8d8c4f69139a5a43d34ffcfb1bc210afbbc
MD5 c831b109731b2210b37036d1f1278600
BLAKE2b-256 067e22c7a3932fba8717b892046a1082f4ae743d3aac8e3849a0cedd6faa71b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page