Skip to main content

Analysis of allele-specific methylation in bisulfite DNA sequencing.

Project description

pyllelic

Language grade: Python CodeFactor Codacy Badge Codacy Badge Code style: black

PyPI Anaconda-Server Badge GitHub

⭐   the project to show your appreciation. :arrow_upper_right:

pyllelic: a tool for detection of allelic-specific methylation variation in bisulfite DNA sequencing files.

Pyllelic documention is available at https://paradoxdruid.github.io/pyllelic/ and see pyllelic_notebook.ipynb for an interactive demonstration.

Dependencies and Installation

Using Conda (preferred)

Create a new conda environment using python 3.8:

Easiest:

# Get environment.yml file from this repo
wget https://github.com/Paradoxdruid/pyllelic/blob/master/environment.yml?raw=true

# Create and activate conda environment
conda create -f environment.yml
conda activate pyllelic
or more explictly step by step instructions
conda create --name pyllelic python=3.8
conda activate pyllelic
conda config --env --add channels conda-forge
conda config --env --add channels bioconda
conda config --env --add channels paradoxdruid
conda install pyllelic 

# Optional but usual use case:
conda install notebook jupyter_contrib_nbextensions ipywidgets

PyPi installation

PyPi instructions

This will require independent installation of samtools, bowtie2, and bismark packages.

# PyPi
python3 -m pip install pyllelic
# or Github
python3 -m pip install git+https://github.com/Paradoxdruid/pyllelic.git

Example exploratory use in jupyter notebook

    from pyllelic import pyllelic

    config = pyllelic.configure(  # Specify file and directory locations
        base_path="/Users/abonham/documents/test_allelic/",
        prom_file="TERT-promoter-genomic-sequence.txt",
        prom_start="1293200",
        prom_end="1296000",
        chrom="5",
        offset=1298163,
    )

    files_set = pyllelic.make_list_of_bam_files(config)  # finds bam files

    # Run pyllelic; make take some time depending on number of bam files
    data = pyllelic.GenomicPositionData(config=config, files_set=files_set)

    positions = data.positions

    cell_types = data.cell_types

    means_df = data.means  # mean methylation of reads

    modes_df = data.modes  # mode methylation of reads
    
    diff_df = data.diffs  # difference mean - mode of reads

    individual_data = data.individual_data  # read methylation values

    data.save("output.xlsx")  # save methylation results

    data.save_pickle("my_run.pickle")  # save data object for later analysis
    
    data.write_means_modes_diffs(filename="Run1_")  # write output data files

    data.histogram("CELL_LINE", "POSITION")  # visualize data for a point

    data.heatmap(min_values=1)  # methylation level heatmap

    data.quma_results["CELL_LINE"]  # see summary data for a cell line

Authors

This software is developed as academic software by Dr. Andrew J. Bonham at the Metropolitan State University of Denver. It is licensed under the GPL v3.0.

This software incorporates implementation from QUMA, licensed under the GPL v3.0.

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

pyllelic-0.2.7.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

pyllelic-0.2.7-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

Details for the file pyllelic-0.2.7.tar.gz.

File metadata

  • Download URL: pyllelic-0.2.7.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.8.2 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.6

File hashes

Hashes for pyllelic-0.2.7.tar.gz
Algorithm Hash digest
SHA256 7e652e1c3a83f9bf530f51df719e476aeb331689b3136c6cbd1cac48e5c04f04
MD5 67e00485d0c1b7e1221da9287f0c618f
BLAKE2b-256 f80d672fbbe0e611b90645dd00bea90c31006f277291b290c1570a0af6984a81

See more details on using hashes here.

File details

Details for the file pyllelic-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: pyllelic-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 31.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.8.2 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.6

File hashes

Hashes for pyllelic-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f1967c14d7e5a59dfa25cf5e68452a7157bc0cc2c0ba3b3d7fbfa6b50973f0f4
MD5 bff49f1ba844799c32c131cf96d7f3bc
BLAKE2b-256 de47adc1830c22148abdf6749155825e299c7b36dccd286949e89c11a91d1a77

See more details on using hashes here.

Supported by

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