Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub-workflow for gene statistics #121

Open
BethYates opened this issue Jun 20, 2024 · 3 comments · Fixed by #136
Open

Sub-workflow for gene statistics #121

BethYates opened this issue Jun 20, 2024 · 3 comments · Fixed by #136
Assignees
Labels
feature Requests for new features

Comments

@BethYates
Copy link
Collaborator

We want to be able to include some standard basic statistics on the gene/protein annotation set for an assembly in a genome note. This sub workflow should accept an annotation set and calculate some statistics, (exact values still to be determined but will most likely be things like the number of protein coding genes, number of non-coding genes, exons per transcript etc as well as BUSCO scores).

This could be a standalone pipeline or could be added to either the genomenote pipeline or to the ensemblgenedownload pipeline, although it may not always be Ensembl that provides the annotations.

  • Exon count
  • Exon length
  • Intron length
  • DNA strand bias
@muffato muffato added the feature Requests for new features label Jun 20, 2024
@BethYates
Copy link
Collaborator Author

After disussing this with the ToL Genome Notes editor they would like to see OMark https://omark.omabrowser.org/ included in the set of tools to evaluate an annotation set

@BethYates
Copy link
Collaborator Author

To close this issue:

  1. Add a new optional parameter --annotation_set which takes in a file path for a directory containing ensembl gene annotation. This directory should have files consistent with the ouput directory from running the sanger-tol/ensemblgenedownload pipeline
  2. In the main workflow or sub-workflow, parse and validate the parameter value and pass the files from the filepath to a new subworkflow - annotation_stats,
  3. Define the sub-workflow annotation_stats and configure it to run only if the --annotation_set parameter is passed.
  4. Create the subwofkflow annotation_stats, it should read in the relevant annotation files and process the data to generate the following statistics:
- TRANSC_MRNA: the number of transcribed mRNAs 
- PCG: the number of protein coding genes
- NCG: the number of non-coding genes
- CDS_PER_GENE: the average number of coding transcripts per gene
- EXONS_PER_TRANSC: the average number of exons per transcript
- CDS_LENGTH: the average length of coding sequence
- EXON_SIZE: the average length of a coding exon
- INTRON_SIZE: the average length of coding intron size
  1. Output these statistics to a csv file named as the assemblyID. csv in a directory created in the results directory called annotation_statistics, The CSV file should have the following columns,
    Variable,Value
    where the variable is the name of the variable from the list above an the value is the statistic you have generated.
  2. Run tests to make sure output file is produced.
  3. Update the documentation.

@SandraBabirye SandraBabirye self-assigned this Jul 3, 2024
BethYates added a commit that referenced this issue Aug 16, 2024
Added new subworkflow 'ANNOTATION_STATS' and new parameter --annotation_set to solve issue #121
@BethYates
Copy link
Collaborator Author

The work in #135 goes most of the way to solving this issue, but the output from the subworkflow is currently two files with lots of information rather than one file with just the specific data that we are interested in. The next step is to extend the subworkflow to parse the output of the files produced by the AGAT_SPSTATISTICS and AGAT_SQSTATBASIC.

What I would like to see is

  1. Creation of a new local module that contains a process that calls a python script. (Look at parse_metadata.nf for an example of a local module that performs a similar function) The input to this module should be the output from the two AGAT modules.
  2. Addition of a python script to /bin that reads through the input files and parses out the following information:
- TRANSC_MRNA: the number of transcribed mRNAs 
- PCG: the number of protein coding genes
- NCG: the number of non-coding genes
- CDS_PER_GENE: the average number of coding transcripts per gene
- EXONS_PER_TRANSC: the average number of exons per transcript
- CDS_LENGTH: the average length of coding sequence
- EXON_SIZE: the average length of a coding exon
- INTRON_SIZE: the average length of coding intron size

If you're not sure what any of these terms mean let me know!

  1. The parsed information should be written out to a csv file named as the assemblyID. csv in a directory created in the results directory called annotation_statistics, The CSV file should have the following columns,
    Variable,Value
    where the variable is the name of the variable from the list above an the value is the statistic you have generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Requests for new features
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants