Skip to content
Snippets Groups Projects

Setup

To install the Python virtual environment, run

conda env create --file environment.yml
conda activate transcript-structure-generator

Usage

Input:

  • csv-formatted file ("ID,Count") with counts for individual transcripts
  • probability of intron inclusion (float in range [0,1])
  • gtf-formatted file with exon coordinates of the transcripts included in the csv file

Output:

  • gtf-formatted file containing generated intron/exon structures per transcript
  • csv-formatted file ("NewTranscriptID,ID,Count") with
    • id of generated transcript
    • id of original transcript (without intron inclusions)
    • count

To install package, run

pip install .

To generate the sampled transcripts, open a new shell, activate your environment and run

conda activate transcript-structure-generator

transcript-generator --transcripts <transcripts_file> --annotation <annotations_file> --prob_inclusion=<probability_inclusion> [--log "INFO"]

where the transcripts file should be csv-formatted, the annotation file gtf-formatted and the inclusion probability for introns a float in the range [0,1]. The log parameter is optional and can be one of ["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"]. The default is INFO.

Development

To perform all tests, make sure your environment corresponds to the environment.yml file and run

pytest tests