-
Notifications
You must be signed in to change notification settings - Fork 5
Dev caleb #10
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
Open
grenkoca
wants to merge
8
commits into
main
Choose a base branch
from
dev__caleb
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dev caleb #10
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9bcadf4
Added catch for NA values
grenkoca 30f3c54
Merge pull request #9 from CollinsLabBioComp/main
grenkoca 2054bf9
Updated to add options for count/cp10k
grenkoca 173bebd
Clarified alternate dispersion estimate fitting method (turned off by…
grenkoca 8387a59
Re-enabled plotting
grenkoca dcdabf1
Added catch for invalid filter type
grenkoca e669c2d
Added version check to see if nextflow has stable release of dsl=2
grenkoca 20d17e3
Added version check to see if nextflow has stable release of dsl=2
grenkoca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,11 +77,16 @@ optionList <- list( | |
| help = "Key to use to determine sample source of cells." | ||
| ), | ||
|
|
||
| optparse::make_option(c("-l", "--mean_cp10k_filter"), | ||
| optparse::make_option(c("-l", "--filter_threshold"), | ||
| type = "double", | ||
| default = 1, | ||
| help = "Filter to remove genes with fewer cp10k | ||
| averages." | ||
| help = "Filter to remove genes with fewer cp10k/counts | ||
| averages. See option `--filter_type`" | ||
| ), | ||
| optparse::make_option(c("-x", "--filter_type"), | ||
| type = "character", | ||
| default = 1, | ||
| help = "Either 'counts' or 'cp10k'" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you go ahead and add |
||
| ), | ||
|
|
||
| optparse::make_option(c("-m", "--pre_filter_genes"), | ||
|
|
@@ -553,7 +558,8 @@ get_empty_df <- function() { | |
| ######################## Read Data & Manipulate ################################ | ||
| verbose <- arguments$options$verbose | ||
| output_file_base <- arguments$options$out_file | ||
| mean_filter <- arguments$options$mean_cp10k_filter | ||
| mean_filter <- arguments$options$filter_threshold | ||
| filter_type <- arguments$options$filter_type | ||
| formula_str <- arguments$options$formula | ||
|
|
||
| # Read all data in | ||
|
|
@@ -1006,12 +1012,20 @@ if (nrow(de_results) > 0) { | |
|
|
||
| # Filter | ||
| if (verbose) { | ||
| cat(sprintf("Filtering out genes with mean cp10k expression < %s...\n", | ||
| cat(sprintf("Filtering out genes with mean %s < %s...\n", | ||
| filter_type, | ||
| mean_filter)) | ||
| } | ||
| n_genes_before <- nrow(de_results) | ||
| de_results <- de_results[which(de_results$mean_cp10k > mean_filter), ] | ||
|
|
||
| print(filter_type) | ||
| # Removed because it wasn't working right | ||
| if (filter_type == "cp10k") { | ||
| de_results <- de_results[which(de_results$mean_cp10k > mean_filter), ] | ||
| } else if (filter_type == "counts") { | ||
| de_results <- de_results[which(de_results$mean_counts > mean_filter), ] | ||
| } else { | ||
| stop(sprintf("Error: invalid argument for `filter_type`: expected 'cp10k' or 'counts', got %s", filter_type)) | ||
| } | ||
grenkoca marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if (verbose) { | ||
| cat(sprintf("Done. Filtered %s genes.\n", | ||
| n_genes_before - nrow(de_results))) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you do 'get_filter_phenotype'? Just to make it a bit more verbose