Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Update RNA expression of copy number losses #493

Merged

Conversation

cbethell
Copy link
Contributor

@cbethell cbethell commented Jan 31, 2020

Purpose/implementation Section

The purpose of this PR is to update/revamp the analysis involving RNA expression of copy number losses.
Command line options are implemented, the expression files are updated to use the collapsed files found in the data directory, and the custom functions are refactored.

What scientific question is your analysis addressing?

Do the RNA expression scores of copy number loss calls agree that these calls should be losses?

What GitHub issue does your pull request address?

This PR addresses issue #387.

Directions for reviewers. Tell potential reviewers what kind of feedback you are soliciting.

Which areas should receive a particularly close look?

The calculate_z_score and merge_expression functions found in the rna-expression-functions.R script are edited in this PR in an attempt to speed up the analysis. These functions should be checked for correctness.

Note: For the purpose of plotting, I am using the z-score values (as opposed to the log transformed values that were being used before this PR). I noticed that we were calculating the zscore values but not actively using them, if there are any objections to this I can revert this change.

Note 2: The plots using the stranded expression file in this PR were generated using the subsetted file in the testing directory (the script does not successfully run on my local machine due to the magnitude of the stranded data).

Is there anything that you want to discuss further?

  • Are there any suggestions for plots that may better display the RNA expression of the copy number loss instances? (I am currently looking into other possible options)
  • There are 6 plots generated per annotated cn file, which means that there is a total of 36 plots in this module's plots directory. That being said, should we only represent the plots that utilize the consensus seg annotated file? In doing so, we would also be improving the time it takes to run this module as it would not need to loop through the larger CNVkit and Controlfreec annotated files (my idea for this would be putting the annotated consensus files in their own directory and having the shell script loop over the files in there).

Is the analysis in a mature enough form that the resulting figure(s) and/or table(s) are ready for review?

Yes, this PR is ready for review.

Results

What types of results are included (e.g., table, figure)?

The results include plots for CNVkit, Controlfreec, and the consensus annotated files for each expression file (polyA and stranded).

What is your summary of the results?

Reproducibility Checklist

No new dependencies are included in this PR.

  • The dependencies required to run the code in this pull request have been added to the project Dockerfile.
  • This analysis has been added to continuous integration.

Documentation Checklist

I will update the README to include the plots generated with this module once we determine which plots we want to keep and/or remove.

  • This analysis module has a README and it is up to date.
  • This analysis is recorded in the table in analyses/README.md and the entry is up to date.
  • The analytical code is documented and contains comments.

cbethell and others added 8 commits January 31, 2020 10:40
- implement command line options in `rna-expression-validation.R` and `run-prepare-cn.sh` scripts
- adjust custom functions scripts to reflect command line options
- perform log transforming and zscoring on matrix first in `calculate_z_score` function 
- propagate changes in `merge_expression` function and in `rna-expression-validation.R` script
- run script using polyA expression data for each of the files in `results` (stranded was not run as it was not able to successfully be completed on my local machine due to memory)
- introduce a for loop in the shell script that will run through each of the files in `results` for polyA and stranded expression data (this is commented out until the consensus file has a subset that can be used in circleci)
- old plots are replaced with the new plots reflecting the zscore polyA data
- uncomment for loop in shell script
- add stranded plots for cnvkit, controlfreec, and consensus annotated files (autosomes and x/y files)
@cbethell cbethell marked this pull request as ready for review February 3, 2020 15:26
@cbethell cbethell changed the title WIP: Update RNA expression of copy number losses Update RNA expression of copy number losses Feb 3, 2020
cbethell added a commit to cbethell/OpenPBTA-analysis that referenced this pull request Feb 6, 2020
- update `README` files to reflect changes to the focal -cn-file-preparation module in PR AlexsLemonade#493
Copy link
Member

@jaclyn-taroni jaclyn-taroni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I think this is correct and headed in the direction we want to go (e.g., skipping original caller files by default). As you noted on #387, we are looking to add density plots. We would not necessarily expect all losses to show changes when we look at z-scores (it depends on the gene!) and I have some ideas about where we would go next that I want to marinate on and discuss next week.

@jaclyn-taroni jaclyn-taroni merged commit 8b8ba2b into AlexsLemonade:master Feb 7, 2020
jaclyn-taroni added a commit that referenced this pull request Feb 7, 2020
- update `README` files to reflect changes to the focal -cn-file-preparation module in PR #493

Co-authored-by: Jaclyn Taroni <jaclyn.n.taroni@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants