diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da196c4..4a682b6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: uses: conda-incubator/setup-miniconda@v3 with: mamba-version: "*" - channels: conda-forge,bioconda,defaults + channels: conda-forge,bioconda auto-activate-base: false activate-environment: psqan_venv environment-file: environment.yml diff --git a/.gitignore b/.gitignore index 52fb25d..2cd5302 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .snakemake/ -psqan_venv/ \ No newline at end of file +psqan_venv/ +base_env.yml \ No newline at end of file diff --git a/README.md b/README.md index 6347578..3f6f610 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,25 @@ ## Introduction Despite the advances in tools to process long-read RNA-seq data, the downstream analysis of transcriptional data remains challenging due to the detection of thousands of novel transcripts. From such a large number of transcripts, it is difficult to distinguish between stable transcripts of potential biological importance, partially processed RNAs and splicing noise. It is important to select only the novel transcript models which are reproducible across the samples with a minimum expression value. However, it is difficult to identify optimal expression thresholds to remove artefacts. Consequently, researchers find it challenging to interpret long-read RNA-seq data effectively and generate relevant hypothesis which could be experimentally validated in the laboratory. -PSQAN (Post Sqanti QC ANalysis) is a Snakemake workflow designed to help researchers identify high-confidence transcripts associated with candidate genes. PSQAN performs a gene-based analysis on characterised transcripts generated by [SQANTI3](https://github.com/ConesaLab/SQANTI3 "SQANTI homepage") and [TALON](https://github.com/mortazavilab/TALON/tree/master "TALON homepage"). PSQAN normalises transcript expression per gene and re-groups transcripts into categories which are more appropriate for a transcript discovery analysis, hence making the results more interpretable. PSQAN generates visualisations to help users determine optimal expression thresholds for detecting both known and novel transcripts of probable biological importance. Furthermore, PSQAN allows users to apply multiple transcript level expression thresholds, both to per sample and across all samples. Lastly, PSQAN generates visualisations and an HTML report, enabling users to explore the known and novel transcripts expressed by a gene, alongside their transcript categories and transcript expression. An example of the report generated by PSQAN for a single gene can be downloaded [here](example_output/report.html). +PSQAN (Post Sqanti QC ANalysis) is a Snakemake workflow designed to help researchers identify high-confidence transcripts associated with candidate genes. PSQAN performs a gene-based analysis on characterised transcripts generated by [SQANTI3](https://github.com/ConesaLab/SQANTI3 "SQANTI homepage") and [TALON](https://github.com/mortazavilab/TALON/tree/master "TALON homepage"). PSQAN normalises transcript expression per gene and re-groups transcripts into actionable categories to support transcript prioritisation, hence making the results more interpretable. PSQAN generates visualisations to help users determine optimal expression thresholds for detecting both known and novel transcripts of probable biological importance. Furthermore, PSQAN allows users to apply multiple transcript level expression thresholds, both to per sample and across all samples. Lastly, PSQAN generates visualisations and an HTML report, enabling users to explore the known and novel transcripts expressed by a gene, alongside their transcript categories and transcript expression. An example of the report generated by PSQAN for a single gene can be downloaded [here](example_output/report.html). ### Input data -PSQAN can be used with the transcript characterisation output of either SQANTI3 or TALON, which are the two most prominently used tools in long-read RNA-seq data analysis. PSQAN takes the output produced by SQANTI3 or TALON as input, along with a list of candidate genes to analyse. For each gene, PSQAN extracts the isoforms associated with the gene from the output generated by SQANTI3/TALON and applies a set of filtering criteria to remove potential genomic contamination and rare PCR artifacts. PSQAN removes isoforms with a high percentage of genomic "A"s in their downstream 20 bp window (80% is the default), or if one of its junctions is predicted to be a template switching artifact (tagged as "RTS_stage" by SQANTI3). +PSQAN can be used with the transcript characterisation output of either SQANTI3 or TALON, which are the two most prominently used tools in long-read RNA-seq data analysis. PSQAN takes the output produced by SQANTI3 or TALON as input, along with a list of candidate genes to analyse. For each gene, PSQAN extracts the isoforms associated with the gene from the output generated by SQANTI3/TALON. Since the filtering steps in SQANTI3 and TALON are optional and may be skipped, PSQAN applies its own filtering criteria prior to processing to ensure the removal of potential genomic contamination and rare PCR artifacts. PSQAN removes isoforms with a high percentage of genomic "A"s in their downstream 20 bp window (80% is the default), or if one of its junctions is predicted to be a template switching artifact (tagged as "RTS_stage" by SQANTI3). + +> **_Note:_** Output of TALON does not contain all the transcript-level descriptors required by PSQAN. As a result, certain PSQAN processes are skipped when using TALON output. The processes performed by PSQAN for SQANTI3 and TALON are summarised below: + +PSQAN process | SQANTI3 | TALON +------------- | ------- | -------- +Filtering internal priming artifacts | Yes | Yes +Filtering template switching artifacts | Yes | No (missing required data) +Normalising transcript expression | Yes | Yes +Isoform re-categorisation | Yes | No (missing required data) +Transcript-level filtering | Yes | Yes +Visualisations | Yes | Yes + + ### Normalising transcript expression per gene @@ -153,7 +166,7 @@ working directory |--- report.html # if snakemake report is generated at the end of the run |--- Gene_A/ |--- pre-filtering/ # plots generated before performing filtering - |--- post-filtering/ # plots generated after performing filtering + |--- post-filtering/transcriptsRanked.txt # plots generated after performing filtering |--- logs/ |--- gene_normalised_abundance.txt |--- filtered_transcripts.txt diff --git a/environment.yml b/environment.yml index 855bd02..740694e 100644 --- a/environment.yml +++ b/environment.yml @@ -1,338 +1,357 @@ -name: psqan_venv +name: psqan_env channels: - conda-forge - bioconda - - defaults dependencies: - _libgcc_mutex=0.1=conda_forge - _openmp_mutex=4.5=2_gnu - _r-mutex=1.0.1=anacondar_1 - - amply=0.1.6=pyhd8ed1ab_0 - - appdirs=1.4.4=pyh9f0ad1d_0 + - amply=0.1.6=pyhd8ed1ab_1 + - annotated-types=0.7.0=pyhd8ed1ab_1 + - appdirs=1.4.4=pyhd8ed1ab_1 - argparse-dataclass=2.0.0=pyhd8ed1ab_0 - - attmap=0.13.2=pyhd8ed1ab_0 - - attrs=23.2.0=pyh71513ae_0 - - binutils_impl_linux-64=2.40=hf600244_0 - - black=24.1.1=py312h7900ff3_0 - - brotli-python=1.1.0=py312h30efb56_1 - - bwidget=1.9.14=ha770c72_1 - - bzip2=1.0.8=hd590300_5 - - c-ares=1.25.0=hd590300_0 - - ca-certificates=2023.11.17=hbcca054_0 + - attrs=25.3.0=pyh71513ae_0 + - binutils_impl_linux-64=2.44=h4bf12b8_1 + - brotli-python=1.1.0=py312h2ec8cdc_3 + - bwidget=1.10.1=ha770c72_1 + - bzip2=1.0.8=h4bc722e_7 + - c-ares=1.34.5=hb9d3cd8_0 + - ca-certificates=2025.7.14=hbd8a1cb_0 - cairo=1.16.0=hbbf8b49_1016 - - certifi=2023.11.17=pyhd8ed1ab_0 - - charset-normalizer=3.3.2=pyhd8ed1ab_0 - - click=8.1.7=unix_pyh707e725_0 - - coin-or-cbc=2.10.10=h9002f0b_0 - - coin-or-cgl=0.60.7=h516709c_0 - - coin-or-clp=1.17.8=h1ee7a9c_0 - - coin-or-osi=0.108.8=ha2443b9_0 - - coin-or-utils=2.11.9=hee58242_0 - - coincbc=2.10.10=0_metapackage - - colorama=0.4.6=pyhd8ed1ab_0 - - conda-inject=1.3.1=pyhd8ed1ab_0 - - configargparse=1.7=pyhd8ed1ab_0 + - certifi=2025.7.14=pyhd8ed1ab_0 + - cffi=1.17.1=py312h06ac9bb_0 + - charset-normalizer=3.4.2=pyhd8ed1ab_0 + - click=8.2.1=pyh707e725_0 + - coin-or-cbc=2.10.12=h00e76a6_2 + - coin-or-cgl=0.60.9=h82e2f02_4 + - coin-or-clp=1.17.10=h8a7a1e7_1 + - coin-or-osi=0.108.11=h96cc833_4 + - coin-or-utils=2.11.12=h3a12e53_2 + - colorama=0.4.6=pyhd8ed1ab_1 + - coloredlogs=15.0.1=pyhd8ed1ab_4 + - conda-inject=1.3.2=pyhd8ed1ab_0 + - configargparse=1.7.1=pyhe01879c_0 - connection_pool=0.0.3=pyhd3deb0d_0 - - curl=8.5.0=hdbd6064_0 - - datrie=0.8.2=py312h98912ed_7 - - docutils=0.20.1=py312h7900ff3_3 - - dpath=2.1.6=pyha770c72_0 - - eido=0.2.2=pyhd8ed1ab_0 - - exceptiongroup=1.2.0=pyhd8ed1ab_2 - - expat=2.5.0=hcb278e6_1 + - curl=8.1.2=h409715c_0 + - datrie=0.8.2=py312h66e93f0_8 + - docutils=0.21.2=pyhd8ed1ab_1 + - dpath=2.2.0=pyha770c72_0 + - eido=0.2.4=pyhd8ed1ab_0 + - exceptiongroup=1.3.0=pyhd8ed1ab_0 - font-ttf-dejavu-sans-mono=2.37=hab24e00_0 - font-ttf-inconsolata=3.000=h77eed37_0 - font-ttf-source-code-pro=2.038=h77eed37_0 - - font-ttf-ubuntu=0.83=h77eed37_1 - - fontconfig=2.14.2=h14ed4e7_0 + - font-ttf-ubuntu=0.83=h77eed37_3 + - fontconfig=2.15.0=h7e30c49_1 - fonts-conda-ecosystem=1=0 - fonts-conda-forge=1=0 - - freetype=2.12.1=h267a509_2 + - freetype=2.13.3=ha770c72_1 - fribidi=1.0.10=h36c2ea0_0 - - gcc_impl_linux-64=13.2.0=h338b0a0_3 - - gettext=0.21.1=h27087fc_0 - - gfortran_impl_linux-64=13.2.0=h76e1118_3 - - gitdb=4.0.11=pyhd8ed1ab_0 - - gitpython=3.1.41=pyhd8ed1ab_0 - - gmp=6.3.0=h59595ed_0 - - graphite2=1.3.13=h58526e2_1001 + - gcc_impl_linux-64=15.1.0=h4393ad2_3 + - gettext=0.25.1=h5888daf_0 + - gettext-tools=0.25.1=h5888daf_0 + - gfortran_impl_linux-64=15.1.0=h3b9cdf2_3 + - gitdb=4.0.12=pyhd8ed1ab_0 + - gitpython=3.1.44=pyhff2d567_0 + - graphite2=1.3.14=h5888daf_0 - gsl=2.7=he838d99_0 - - gxx_impl_linux-64=13.2.0=h338b0a0_3 + - gxx_impl_linux-64=15.1.0=h6a1bac1_3 + - h2=4.2.0=pyhd8ed1ab_0 - harfbuzz=7.3.0=hdb3a94d_0 - - humanfriendly=10.0=pyhd8ed1ab_6 + - hpack=4.1.0=pyhd8ed1ab_0 + - humanfriendly=10.0=pyh707e725_8 + - hyperframe=6.1.0=pyhd8ed1ab_0 - icu=72.1=hcb278e6_0 - - idna=3.6=pyhd8ed1ab_0 - - immutables=0.20=py312h98912ed_1 - - importlib_resources=6.1.1=pyhd8ed1ab_0 - - iniconfig=2.0.0=pyhd8ed1ab_0 - - jinja2=3.1.3=pyhd8ed1ab_0 - - jsonschema=4.20.0=pyhd8ed1ab_0 - - jsonschema-specifications=2023.12.1=pyhd8ed1ab_0 - - jupyter_core=5.7.1=py312h7900ff3_0 - - kernel-headers_linux-64=2.6.32=he073ed8_16 + - idna=3.10=pyhd8ed1ab_1 + - immutables=0.21=py312h66e93f0_1 + - iniconfig=2.0.0=pyhd8ed1ab_1 + - jinja2=3.1.6=pyhd8ed1ab_0 + - jsonschema=4.24.1=pyhe01879c_0 + - jsonschema-specifications=2025.4.1=pyh29332c3_0 + - jupyter_core=5.8.1=pyh31011fe_0 + - kernel-headers_linux-64=4.18.0=he073ed8_8 - keyutils=1.6.1=h166bdaf_0 - krb5=1.20.1=h81ceb04_0 - - ld_impl_linux-64=2.40=h41732ed_0 - - lerc=4.0.0=h27087fc_0 - - libblas=3.9.0=20_linux64_openblas - - libcblas=3.9.0=20_linux64_openblas - - libcurl=8.5.0=h251f7ec_0 + - ld_impl_linux-64=2.44=h1423503_1 + - lerc=4.0.0=h0aef613_1 + - libasprintf=0.25.1=h8e693c7_0 + - libasprintf-devel=0.25.1=h8e693c7_0 + - libblas=3.9.0=32_h59b9bed_openblas + - libcblas=3.9.0=32_he106b2a_openblas + - libcurl=8.1.2=h409715c_0 - libdeflate=1.18=h0b41bf4_0 - - libedit=3.1.20191231=he28a2e2_2 + - libedit=3.1.20250104=pl5321h7949ede_0 - libev=4.33=hd590300_2 - - libexpat=2.5.0=hcb278e6_1 - - libffi=3.4.2=h7f98852_5 - - libgcc-devel_linux-64=13.2.0=ha9c7c90_103 - - libgcc-ng=13.2.0=h807b86a_3 - - libgfortran-ng=13.2.0=h69a702a_3 - - libgfortran5=13.2.0=ha4646dd_3 + - libexpat=2.7.1=hecca717_0 + - libffi=3.4.6=h2dba641_1 + - libfreetype=2.13.3=ha770c72_1 + - libfreetype6=2.13.3=h48d6fc4_1 + - libgcc=15.1.0=h767d61c_3 + - libgcc-devel_linux-64=15.1.0=h4c094af_103 + - libgcc-ng=15.1.0=h69a702a_3 + - libgettextpo=0.25.1=h5888daf_0 + - libgettextpo-devel=0.25.1=h5888daf_0 + - libgfortran=15.1.0=h69a702a_3 + - libgfortran-ng=15.1.0=h69a702a_3 + - libgfortran5=15.1.0=hcea5267_3 - libglib=2.78.1=hebfc3b9_0 - - libgomp=13.2.0=h807b86a_3 - - libiconv=1.17=hd590300_2 + - libgomp=15.1.0=h767d61c_3 + - libiconv=1.18=h4ce23a2_1 - libjpeg-turbo=2.1.5.1=hd590300_1 - - liblapack=3.9.0=20_linux64_openblas - - liblapacke=3.9.0=20_linux64_openblas - - libnghttp2=1.58.0=h47da74e_1 - - libnsl=2.0.1=hd590300_0 - - libopenblas=0.3.25=pthreads_h413a1c8_0 - - libpng=1.6.39=h753d276_0 - - libsanitizer=13.2.0=h7e041cc_3 - - libsqlite=3.44.2=h2797004_0 - - libssh2=1.11.0=h0841786_0 - - libstdcxx-devel_linux-64=13.2.0=ha9c7c90_103 - - libstdcxx-ng=13.2.0=h7e041cc_3 + - liblapack=3.9.0=32_h7ac8fdf_openblas + - liblapacke=3.9.0=32_he2f377e_openblas + - liblzma=5.8.1=hb9d3cd8_2 + - liblzma-devel=5.8.1=hb9d3cd8_2 + - libnghttp2=1.64.0=h161d5f1_0 + - libnsl=2.0.1=hb9d3cd8_1 + - libopenblas=0.3.30=pthreads_h94d23a6_0 + - libpng=1.6.50=h943b412_0 + - libsanitizer=15.1.0=h97b714f_3 + - libsqlite=3.50.3=h0c1763c_0 + - libssh2=1.11.1=hcf80075_0 + - libstdcxx=15.1.0=h8f9b012_3 + - libstdcxx-devel_linux-64=15.1.0=h4c094af_103 + - libstdcxx-ng=15.1.0=h4852527_3 - libtiff=4.5.1=h8b53f26_1 - libuuid=2.38.1=h0b41bf4_0 - libv8=8.9.83=h3f08ab5_3 - - libwebp-base=1.3.2=hd590300_0 + - libwebp-base=1.6.0=hd42ef1d_0 - libxcb=1.15=h0b41bf4_0 - libxcrypt=4.4.36=hd590300_1 - libxml2=2.11.5=h0d562d8_0 - - libzlib=1.2.13=hd590300_5 - - logmuse=0.2.6=pyh8c360ce_0 - - make=4.3=hd18ef5c_1 - - markdown-it-py=3.0.0=pyhd8ed1ab_0 - - markupsafe=2.1.3=py312h98912ed_1 - - mdurl=0.1.2=pyhd8ed1ab_0 - - mypy_extensions=1.0.0=pyha770c72_0 - - nbformat=5.9.2=pyhd8ed1ab_0 - - ncurses=6.4=h59595ed_2 - - numpy=1.26.3=py312heda63a1_0 - - openssl=3.2.0=hd590300_1 - - packaging=23.2=pyhd8ed1ab_0 - - pandas=2.1.4=py312hfb8ada1_0 - - pandoc=3.1.3=h32600fe_0 + - libzlib=1.3.1=hb9d3cd8_2 + - logmuse=0.2.8=pyhd8ed1ab_1 + - make=4.4.1=hb9d3cd8_2 + - markdown-it-py=3.0.0=pyhd8ed1ab_1 + - markupsafe=3.0.2=py312h178313f_1 + - mdurl=0.1.2=pyhd8ed1ab_1 + - nbformat=5.10.4=pyhd8ed1ab_1 + - ncurses=6.5=h2d0b736_3 + - numpy=2.3.1=py312h33ff503_1 + - openssl=3.5.1=h7b32b05_0 + - packaging=25.0=pyh29332c3_1 + - pandas=2.3.1=py312hf79963d_0 + - pandoc=3.7.0.2=ha770c72_0 - pango=1.50.14=heaa33ce_1 - - pathspec=0.12.1=pyhd8ed1ab_0 - pcre2=10.40=hc3806b6_0 - - peppy=0.40.0=pyhd8ed1ab_0 - - pip=23.3.2=pyhd8ed1ab_0 - - pixman=0.43.0=h59595ed_0 - - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1 - - plac=1.4.2=pyhd8ed1ab_0 - - platformdirs=4.1.0=pyhd8ed1ab_0 - - pluggy=1.3.0=pyhd8ed1ab_0 - - psutil=5.9.7=py312h98912ed_0 - - pthread-stubs=0.4=h36c2ea0_1001 - - pulp=2.8.0=py312h7900ff3_0 - - pygments=2.17.2=pyhd8ed1ab_0 - - pyparsing=3.1.1=pyhd8ed1ab_0 - - pysocks=1.7.1=pyha2e5f31_6 - - pytest=7.4.4=pyhd8ed1ab_0 - - python=3.12.1=hab00c5b_1_cpython - - python-dateutil=2.8.2=pyhd8ed1ab_0 - - python-fastjsonschema=2.19.1=pyhd8ed1ab_0 - - python-tzdata=2023.4=pyhd8ed1ab_0 - - python_abi=3.12=4_cp312 - - pytz=2023.3.post1=pyhd8ed1ab_0 - - pyyaml=6.0.1=py312h98912ed_1 - - r-askpass=1.2.0=r43h57805ef_0 - - r-assertthat=0.2.1=r43hc72bb7e_4 - - r-backports=1.4.1=r43h57805ef_2 + - pephubclient=0.4.4=pyhd8ed1ab_1 + - peppy=0.40.7=pyhd8ed1ab_2 + - pip=25.1.1=pyh8b19718_0 + - pixman=0.46.2=h29eaf8c_0 + - plac=1.4.5=pyhd8ed1ab_0 + - platformdirs=4.3.8=pyhe01879c_0 + - pluggy=1.6.0=pyhd8ed1ab_0 + - psutil=7.0.0=py312h66e93f0_0 + - pthread-stubs=0.4=hb9d3cd8_1002 + - pulp=2.8.0=py312hd0750ca_2 + - pycparser=2.22=pyh29332c3_1 + - pydantic=2.11.7=pyh3cfb1c2_0 + - pydantic-core=2.33.2=py312h680f630_0 + - pygments=2.19.2=pyhd8ed1ab_0 + - pyparsing=3.2.3=pyhd8ed1ab_1 + - pysocks=1.7.1=pyha55dd90_7 + - pytest=8.4.1=pyhd8ed1ab_0 + - python=3.12.11=h9e4cc4f_0_cpython + - python-dateutil=2.9.0.post0=pyhe01879c_2 + - python-fastjsonschema=2.21.1=pyhd8ed1ab_0 + - python-tzdata=2025.2=pyhd8ed1ab_0 + - python_abi=3.12=8_cp312 + - pytz=2025.2=pyhd8ed1ab_0 + - pyyaml=6.0.2=py312h178313f_2 + - r-askpass=1.2.1=r43h2b5f3a1_0 + - r-assertthat=0.2.1=r43hc72bb7e_5 + - r-backports=1.5.0=r43hb1dbf0f_1 - r-base=4.3.0=hfabd6f2_3 - - r-base64enc=0.1_3=r43h57805ef_1006 - - r-bigd=0.2.0=r43hc72bb7e_1 - - r-bit=4.0.5=r43h57805ef_1 - - r-bit64=4.0.5=r43h57805ef_2 - - r-bitops=1.0_7=r43h57805ef_2 - - r-blastula=0.3.4=r43hc72bb7e_0 - - r-blob=1.2.4=r43hc72bb7e_1 - - r-brio=1.1.4=r43h57805ef_0 - - r-broom=1.0.5=r43hc72bb7e_1 - - r-bslib=0.6.1=r43hc72bb7e_0 - - r-cachem=1.0.8=r43h57805ef_1 - - r-callr=3.7.3=r43hc72bb7e_1 - - r-cellranger=1.1.0=r43hc72bb7e_1006 - - r-cli=3.6.2=r43ha503ecb_0 - - r-clipr=0.8.0=r43hc72bb7e_2 - - r-colorspace=2.1_0=r43h57805ef_1 - - r-commonmark=1.9.0=r43h57805ef_1 - - r-conflicted=1.2.0=r43h785f33e_1 - - r-cpp11=0.4.7=r43hc72bb7e_0 - - r-crayon=1.5.2=r43hc72bb7e_2 - - r-curl=5.1.0=r43hf9611b0_0 - - r-data.table=1.14.10=r43h029312a_1 - - r-dbi=1.2.1=r43hc72bb7e_0 - - r-dbplyr=2.4.0=r43hc72bb7e_0 - - r-desc=1.4.3=r43hc72bb7e_0 - - r-diffobj=0.3.5=r43h57805ef_2 - - r-digest=0.6.34=r43ha503ecb_0 - - r-dplyr=1.1.4=r43ha503ecb_0 - - r-dtplyr=1.3.1=r43hc72bb7e_1 - - r-ellipsis=0.3.2=r43h57805ef_2 - - r-evaluate=0.23=r43hc72bb7e_0 - - r-fansi=1.0.6=r43h57805ef_0 - - r-farver=2.1.1=r43ha503ecb_2 - - r-fastmap=1.1.1=r43ha503ecb_1 - - r-fontawesome=0.5.2=r43hc72bb7e_0 - - r-forcats=1.0.0=r43hc72bb7e_1 - - r-fs=1.6.3=r43ha503ecb_0 - - r-gargle=1.5.2=r43h785f33e_0 - - r-generics=0.1.3=r43hc72bb7e_2 - - r-getopt=1.20.4=r43ha770c72_0 - - r-getpass=0.2_4=r43h57805ef_0 - - r-ggplot2=3.4.4=r43hc72bb7e_0 - - r-glue=1.7.0=r43h57805ef_0 - - r-googledrive=2.1.1=r43hc72bb7e_1 - - r-googlesheets4=1.1.1=r43h785f33e_1 - - r-gt=0.10.0=r43hc72bb7e_0 - - r-gtable=0.3.4=r43hc72bb7e_0 - - r-haven=2.5.4=r43ha503ecb_0 - - r-here=1.0.1=r43hc72bb7e_2 - - r-highr=0.10=r43hc72bb7e_1 - - r-hms=1.1.3=r43hc72bb7e_1 - - r-htmltools=0.5.7=r43ha503ecb_0 - - r-htmlwidgets=1.6.4=r43hc72bb7e_1 - - r-httr=1.4.7=r43hc72bb7e_0 - - r-ids=1.0.1=r43hc72bb7e_3 - - r-isoband=0.2.7=r43ha503ecb_2 - - r-jquerylib=0.1.4=r43hc72bb7e_2 - - r-jsonlite=1.8.8=r43h57805ef_0 - - r-juicyjuice=0.1.0=r43hc72bb7e_1 - - r-knitr=1.45=r43hc72bb7e_0 - - r-labeling=0.4.3=r43hc72bb7e_0 - - r-lattice=0.22_5=r43h57805ef_0 - - r-lifecycle=1.0.4=r43hc72bb7e_0 - - r-lubridate=1.9.3=r43h57805ef_0 - - r-magrittr=2.0.3=r43h57805ef_2 - - r-markdown=1.12=r43hc72bb7e_0 - - r-mass=7.3_60=r43h57805ef_1 - - r-matrix=1.6_5=r43h316c678_0 - - r-matrixstats=1.2.0=r43h57805ef_0 - - r-memoise=2.0.1=r43hc72bb7e_2 - - r-mgcv=1.9_1=r43h316c678_0 - - r-mime=0.12=r43h57805ef_2 - - r-modelr=0.1.11=r43hc72bb7e_1 - - r-munsell=0.5.0=r43hc72bb7e_1006 - - r-nlme=3.1_164=r43h61816a4_0 - - r-openssl=2.1.1=r43hb353fa6_0 - - r-optparse=1.7.4=r43hc72bb7e_0 - - r-pillar=1.9.0=r43hc72bb7e_1 - - r-pkgbuild=1.4.2=r43hc72bb7e_0 - - r-pkgconfig=2.0.3=r43hc72bb7e_3 - - r-pkgload=1.3.3=r43hc72bb7e_0 - - r-pointblank=0.11.4=r43hc72bb7e_1 - - r-praise=1.0.0=r43hc72bb7e_1007 - - r-prettyunits=1.2.0=r43hc72bb7e_0 - - r-processx=3.8.3=r43h57805ef_0 - - r-progress=1.2.3=r43hc72bb7e_0 - - r-ps=1.7.5=r43h57805ef_1 - - r-purrr=1.0.2=r43h57805ef_0 - - r-r6=2.5.1=r43hc72bb7e_2 + - r-base64enc=0.1_3=r43hb1dbf0f_1007 + - r-bigd=0.3.1=r43hc72bb7e_0 + - r-bit=4.6.0=r43h2b5f3a1_0 + - r-bit64=4.6.0_1=r43h2b5f3a1_0 + - r-bitops=1.0_9=r43h2b5f3a1_0 + - r-blastula=0.3.6=r43hc72bb7e_0 + - r-blob=1.2.4=r43hc72bb7e_2 + - r-brio=1.1.5=r43hb1dbf0f_1 + - r-broom=1.0.8=r43hc72bb7e_0 + - r-bslib=0.9.0=r43hc72bb7e_0 + - r-cachem=1.1.0=r43hb1dbf0f_1 + - r-callr=3.7.6=r43hc72bb7e_1 + - r-cellranger=1.1.0=r43hc72bb7e_1007 + - r-cli=3.6.5=r43h93ab643_0 + - r-clipr=0.8.0=r43hc72bb7e_3 + - r-colorspace=2.1_1=r43hdb488b9_0 + - r-commonmark=2.0.0=r43h2b5f3a1_0 + - r-conflicted=1.2.0=r43h785f33e_2 + - r-cpp11=0.5.2=r43h785f33e_1 + - r-crayon=1.5.3=r43hc72bb7e_1 + - r-curl=5.0.1=r43hf9611b0_0 + - r-data.table=1.17.6=r43he23165d_0 + - r-dbi=1.2.3=r43hc72bb7e_1 + - r-dbplyr=2.5.0=r43hc72bb7e_1 + - r-desc=1.4.3=r43hc72bb7e_1 + - r-diffobj=0.3.6=r43h2b5f3a1_0 + - r-digest=0.6.37=r43h0d4f4ea_0 + - r-dplyr=1.1.4=r43h0d4f4ea_1 + - r-dtplyr=1.3.1=r43hc72bb7e_2 + - r-ellipsis=0.3.2=r43hb1dbf0f_3 + - r-evaluate=1.0.4=r43hc72bb7e_0 + - r-fansi=1.0.6=r43hb1dbf0f_1 + - r-farver=2.1.2=r43ha18555a_1 + - r-fastmap=1.2.0=r43ha18555a_1 + - r-fontawesome=0.5.3=r43hc72bb7e_0 + - r-forcats=1.0.0=r43hc72bb7e_2 + - r-fs=1.6.6=r43h93ab643_0 + - r-gargle=1.5.2=r43h785f33e_1 + - r-generics=0.1.4=r43hc72bb7e_0 + - r-getopt=1.20.4=r43ha770c72_1 + - r-getpass=0.2_4=r43hdb488b9_1 + - r-ggplot2=3.5.2=r43hc72bb7e_0 + - r-glue=1.8.0=r43h2b5f3a1_0 + - r-googledrive=2.1.1=r43hc72bb7e_2 + - r-googlesheets4=1.1.1=r43h785f33e_2 + - r-gt=1.0.0=r43hc72bb7e_0 + - r-gtable=0.3.6=r43hc72bb7e_0 + - r-haven=2.5.4=r43h0d4f4ea_1 + - r-here=1.0.1=r43hc72bb7e_3 + - r-highr=0.11=r43hc72bb7e_1 + - r-hms=1.1.3=r43hc72bb7e_2 + - r-htmltools=0.5.8.1=r43ha18555a_1 + - r-htmlwidgets=1.6.4=r43h785f33e_3 + - r-httr=1.4.7=r43hc72bb7e_1 + - r-ids=1.0.1=r43hc72bb7e_4 + - r-isoband=0.2.7=r43ha18555a_3 + - r-jquerylib=0.1.4=r43hc72bb7e_3 + - r-jsonlite=2.0.0=r43h2b5f3a1_0 + - r-juicyjuice=0.1.0=r43hc72bb7e_2 + - r-knitr=1.50=r43hc72bb7e_0 + - r-labeling=0.4.3=r43hc72bb7e_1 + - r-lattice=0.22_7=r43h2b5f3a1_0 + - r-lifecycle=1.0.4=r43hc72bb7e_1 + - r-litedown=0.7=r43hc72bb7e_0 + - r-lubridate=1.9.4=r43h2b5f3a1_0 + - r-magrittr=2.0.3=r43hb1dbf0f_3 + - r-markdown=2.0=r43hc72bb7e_0 + - r-mass=7.3_60.0.1=r43hb1dbf0f_1 + - r-matrix=1.6_5=r43he966344_1 + - r-matrixstats=1.5.0=r43h2b5f3a1_0 + - r-memoise=2.0.1=r43hc72bb7e_3 + - r-mgcv=1.9_3=r43h2ae2be5_0 + - r-mime=0.13=r43h2b5f3a1_0 + - r-modelr=0.1.11=r43hc72bb7e_2 + - r-munsell=0.5.1=r43hc72bb7e_1 + - r-nlme=3.1_168=r43hb67ce94_0 + - r-openssl=2.3.3=r43he8289e2_0 + - r-optparse=1.7.5=r43hc72bb7e_1 + - r-pillar=1.11.0=r43hc72bb7e_0 + - r-pkgbuild=1.4.8=r43hc72bb7e_0 + - r-pkgconfig=2.0.3=r43hc72bb7e_4 + - r-pkgload=1.4.0=r43hc72bb7e_0 + - r-pointblank=0.12.2=r43hc72bb7e_0 + - r-praise=1.0.0=r43hc72bb7e_1008 + - r-prettyunits=1.2.0=r43hc72bb7e_1 + - r-processx=3.8.6=r43h2b5f3a1_0 + - r-progress=1.2.3=r43hc72bb7e_1 + - r-ps=1.9.1=r43h2b5f3a1_0 + - r-purrr=1.1.0=r43h54b55ab_0 + - r-r6=2.6.1=r43hc72bb7e_0 - r-ragg=1.2.5=r43h85cdef0_2 - - r-rappdirs=0.3.3=r43h57805ef_2 - - r-rcolorbrewer=1.1_3=r43h785f33e_2 - - r-rcpp=1.0.12=r43h7df8631_0 - - r-reactable=0.4.4=r43hc72bb7e_1 - - r-reactr=0.5.0=r43hc72bb7e_0 - - r-readr=2.1.5=r43ha503ecb_0 - - r-readxl=1.4.3=r43ha5c9fba_0 - - r-rematch=2.0.0=r43hc72bb7e_0 - - r-rematch2=2.1.2=r43hc72bb7e_3 - - r-reprex=2.1.0=r43hc72bb7e_0 - - r-rlang=1.1.3=r43ha503ecb_0 - - r-rmarkdown=2.25=r43hc72bb7e_0 - - r-rprojroot=2.0.4=r43hc72bb7e_0 - - r-rstudioapi=0.15.0=r43hc72bb7e_0 - - r-rvest=1.0.3=r43hc72bb7e_2 - - r-sass=0.4.8=r43ha503ecb_0 - - r-scales=1.3.0=r43hc72bb7e_0 - - r-selectr=0.4_2=r43hc72bb7e_3 + - r-rappdirs=0.3.3=r43hb1dbf0f_3 + - r-rcolorbrewer=1.1_3=r43h785f33e_3 + - r-rcpp=1.1.0=r43h93ab643_0 + - r-reactable=0.4.4=r43hc72bb7e_2 + - r-reactr=0.6.1=r43hc72bb7e_0 + - r-readr=2.1.5=r43h0d4f4ea_1 + - r-readxl=1.4.5=r43h328fee5_0 + - r-rematch=2.0.0=r43hc72bb7e_1 + - r-rematch2=2.1.2=r43hc72bb7e_4 + - r-reprex=2.1.1=r43hc72bb7e_1 + - r-rlang=1.1.6=r43h93ab643_0 + - r-rmarkdown=2.29=r43hc72bb7e_0 + - r-rprojroot=2.1.0=r43hc72bb7e_0 + - r-rstudioapi=0.17.1=r43hc72bb7e_0 + - r-rvest=1.0.4=r43hc72bb7e_1 + - r-sass=0.4.10=r43h93ab643_0 + - r-scales=1.4.0=r43hc72bb7e_0 + - r-selectr=0.4_2=r43hc72bb7e_4 - r-stringi=1.7.12=r43hc0c3e09_2 - - r-stringr=1.5.1=r43h785f33e_0 - - r-sys=3.4.2=r43h57805ef_1 - - r-systemfonts=1.0.5=r43haf97adc_0 - - r-testthat=3.2.1=r43ha503ecb_0 + - r-stringr=1.5.1=r43h785f33e_1 + - r-sys=3.4.3=r43h2b5f3a1_0 + - r-systemfonts=1.2.3=r43h5c043a3_0 + - r-testthat=3.2.3=r43h93ab643_0 - r-textshaping=0.3.6=r43h24cd192_6 - - r-tibble=3.2.1=r43h57805ef_2 - - r-tidyr=1.3.0=r43ha503ecb_1 - - r-tidyselect=1.2.0=r43hc72bb7e_1 - - r-tidyverse=2.0.0=r43h785f33e_1 - - r-timechange=0.2.0=r43ha503ecb_1 - - r-tinytex=0.49=r43hc72bb7e_1 - - r-tzdb=0.4.0=r43ha503ecb_1 - - r-utf8=1.2.4=r43h57805ef_0 - - r-uuid=1.2_0=r43h57805ef_0 + - r-tibble=3.3.0=r43h2b5f3a1_0 + - r-tidyr=1.3.1=r43h0d4f4ea_1 + - r-tidyselect=1.2.1=r43hc72bb7e_1 + - r-tidyverse=2.0.0=r43h785f33e_2 + - r-timechange=0.3.0=r43ha18555a_1 + - r-tinytex=0.57=r43hc72bb7e_0 + - r-tzdb=0.5.0=r43h93ab643_0 + - r-utf8=1.2.6=r43h2b5f3a1_0 + - r-uuid=1.2_1=r43hdb488b9_0 - r-v8=4.3.3=r43h8e9208c_0 - - r-vctrs=0.6.5=r43ha503ecb_0 - - r-viridislite=0.4.2=r43hc72bb7e_1 - - r-vroom=1.6.5=r43ha503ecb_0 - - r-waldo=0.5.2=r43hc72bb7e_0 - - r-withr=2.5.2=r43hc72bb7e_0 - - r-xfun=0.41=r43ha503ecb_0 + - r-vctrs=0.6.5=r43h0d4f4ea_1 + - r-viridislite=0.4.2=r43hc72bb7e_2 + - r-vroom=1.6.5=r43h0d4f4ea_1 + - r-waldo=0.6.2=r43hc72bb7e_0 + - r-withr=3.0.2=r43hc72bb7e_0 + - r-xfun=0.52=r43h93ab643_0 - r-xml2=1.3.5=r43h1ad5fc0_0 - - r-yaml=2.3.8=r43h57805ef_0 - - readline=8.2=h8228510_1 - - referencing=0.32.1=pyhd8ed1ab_0 - - requests=2.31.0=pyhd8ed1ab_0 - - reretry=0.11.8=pyhd8ed1ab_0 - - rich=13.7.0=pyhd8ed1ab_0 - - rpds-py=0.17.1=py312h4b3b743_0 - - sed=4.8=he412f7d_0 - - setuptools=69.0.3=pyhd8ed1ab_0 - - six=1.16.0=pyh6c4a22f_0 - - slack-sdk=3.26.2=pyha770c72_0 - - slack_sdk=3.26.2=hd8ed1ab_0 - - smart_open=6.4.0=pyhd8ed1ab_0 - - smmap=5.0.0=pyhd8ed1ab_0 - - snakefmt=0.10.0=pyhdfd78af_0 + - r-yaml=2.3.10=r43hdb488b9_0 + - readline=8.2=h8c095d6_2 + - referencing=0.36.2=pyh29332c3_0 + - requests=2.32.4=pyhd8ed1ab_0 + - reretry=0.11.8=pyhd8ed1ab_1 + - rich=14.0.0=pyh29332c3_0 + - rpds-py=0.26.0=py312h680f630_0 + - sed=4.9=h6688a6e_0 + - setuptools=80.9.0=pyhff2d567_0 + - shellingham=1.5.4=pyhd8ed1ab_1 + - six=1.17.0=pyhd8ed1ab_0 + - slack-sdk=3.36.0=pyhd8ed1ab_0 + - slack_sdk=3.36.0=hd8ed1ab_0 + - smart_open=7.3.0.post1=pyhe01879c_0 + - smmap=5.0.2=pyhd8ed1ab_0 - snakemake=8.4.2=hdfd78af_0 - - snakemake-interface-common=1.15.1=pyhdfd78af_0 + - snakemake-interface-common=1.20.1=pyhdfd78af_0 - snakemake-interface-executor-plugins=8.2.0=pyhdfd78af_0 - - snakemake-interface-storage-plugins=3.0.0=pyhdfd78af_0 + - snakemake-interface-storage-plugins=3.5.0=pyhdfd78af_0 - snakemake-minimal=8.4.2=pyhdfd78af_0 - - stopit=1.1.2=py_0 - - sysroot_linux-64=2.12=he073ed8_16 - - tabulate=0.9.0=pyhd8ed1ab_1 + - stopit=1.1.2=pyhd8ed1ab_1 + - sysroot_linux-64=2.28=h4ee821c_8 + - tabulate=0.9.0=pyhd8ed1ab_2 - throttler=1.2.2=pyhd8ed1ab_0 - - tk=8.6.13=noxft_h4845f30_101 - - tktable=2.10=h0c5db8f_5 - - toml=0.10.2=pyhd8ed1ab_0 - - tomli=2.0.1=pyhd8ed1ab_0 - - toposort=1.10=pyhd8ed1ab_0 - - traitlets=5.14.1=pyhd8ed1ab_0 - - typing_extensions=4.9.0=pyha770c72_0 - - tzdata=2023d=h0c530f3_0 - - ubiquerg=0.6.3=pyhd8ed1ab_0 - - urllib3=2.1.0=pyhd8ed1ab_0 + - tk=8.6.13=noxft_hd72426e_102 + - tktable=2.10=h8d826fa_7 + - tomli=2.2.1=pyhd8ed1ab_1 + - toposort=1.10=pyhd8ed1ab_1 + - traitlets=5.14.3=pyhd8ed1ab_1 + - typer=0.16.0=pyh167b9f4_0 + - typer-slim=0.16.0=pyhe01879c_0 + - typer-slim-standard=0.16.0=hf964461_0 + - typing-extensions=4.14.1=h4440ef1_0 + - typing-inspection=0.4.1=pyhd8ed1ab_0 + - typing_extensions=4.14.1=pyhe01879c_0 + - tzdata=2025b=h78e105d_0 + - ubiquerg=0.8.0=pyhd8ed1ab_0 + - urllib3=2.5.0=pyhd8ed1ab_0 - veracitools=0.1.3=py_0 - - wheel=0.42.0=pyhd8ed1ab_0 - - wrapt=1.16.0=py312h98912ed_0 - - xorg-kbproto=1.0.7=h7f98852_1002 - - xorg-libice=1.1.1=hd590300_0 - - xorg-libsm=1.2.4=h7391055_0 - - xorg-libx11=1.8.7=h8ee46fc_0 - - xorg-libxau=1.0.11=hd590300_0 - - xorg-libxdmcp=1.1.3=h7f98852_0 + - wheel=0.45.1=pyhd8ed1ab_1 + - wrapt=1.17.2=py312h66e93f0_0 + - xorg-kbproto=1.0.7=hb9d3cd8_1003 + - xorg-libice=1.1.2=hb9d3cd8_0 + - xorg-libsm=1.2.6=he73a12e_0 + - xorg-libx11=1.8.9=h8ee46fc_0 + - xorg-libxau=1.0.12=hb9d3cd8_0 + - xorg-libxdmcp=1.1.5=hb9d3cd8_0 - xorg-libxext=1.3.4=h0b41bf4_2 - xorg-libxrender=0.9.11=hd590300_0 - xorg-libxt=1.3.0=hd590300_1 - - xorg-renderproto=0.11.1=h7f98852_1002 - - xorg-xextproto=7.3.0=h0b41bf4_1003 - - xorg-xproto=7.0.31=h7f98852_1007 - - xz=5.2.6=h166bdaf_0 + - xorg-renderproto=0.11.1=hb9d3cd8_1003 + - xorg-xextproto=7.3.0=hb9d3cd8_1004 + - xorg-xproto=7.0.31=hb9d3cd8_1008 + - xz=5.8.1=hbcc6ac9_2 + - xz-gpl-tools=5.8.1=hbcc6ac9_2 + - xz-tools=5.8.1=hb9d3cd8_2 - yaml=0.2.5=h7f98852_2 - - yte=1.5.4=pyha770c72_0 - - zipp=3.17.0=pyhd8ed1ab_0 - - zlib=1.2.13=hd590300_5 - - zstd=1.5.5=hfc55251_0 + - yte=1.8.1=pyha770c72_0 + - zlib=1.3.1=hb9d3cd8_2 + - zstandard=0.23.0=py312h66e93f0_2 + - zstd=1.5.7=hb8e6e7a_2 diff --git a/workflow/Snakefile b/workflow/Snakefile index 8e3946f..badb931 100755 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -73,6 +73,7 @@ rule all: expand("{geneid}/post_filtering/tc_NFLR_main.png", geneid=genes), # rank transcripts expand("{geneid}/post_filtering/transcriptsRanked_main.png", geneid=genes), + expand("{geneid}/post_filtering/transcriptsRanked.txt", geneid=genes), rule normalise_gene_abundance: @@ -331,6 +332,7 @@ rule rank_transcripts: }, ) ], + res="{geneid}/post_filtering/transcriptsRanked.txt", params: respath="{geneid}/post_filtering", abundance_type=config["abundance_type"], diff --git a/workflow/scripts/rank_transcripts.R b/workflow/scripts/rank_transcripts.R index 5ecef91..2353707 100755 --- a/workflow/scripts/rank_transcripts.R +++ b/workflow/scripts/rank_transcripts.R @@ -79,6 +79,11 @@ if(opt$abundance_file_type == "SQANTI"){ #### Transcripts (ranked) vs. NFLR ###### res <- .rank_transcripts(x.gene) +#### write to file ### +file_output <- res$x.ranked +file_output$Isoform_class <- stringr::str_replace(file_output$Isoform_class, "\n", "") +write.table(file_output, str_c(opt$outpath, "/transcriptsRanked.txt"), col.names = TRUE, row.names=FALSE, sep="\t", quote = FALSE) + # ggplot plotting theme parameters mytheme <- theme_bw() + theme(plot.title = element_text(lineheight=.4, size=12, hjust=0.5),