-
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
base: main
Are you sure you want to change the base?
Dev caleb #10
Changes from 5 commits
9bcadf4
30f3c54
2054bf9
173bebd
8387a59
dcdabf1
e669c2d
20d17e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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,18 @@ 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), ] | ||
| } | ||
|
grenkoca marked this conversation as resolved.
|
||
| if (verbose) { | ||
| cat(sprintf("Done. Filtered %s genes.\n", | ||
| n_genes_before - nrow(de_results))) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #!/usr/bin/env nextflow | ||
|
|
||
| nextflow.preview.dsl = 2 | ||
| nextflow.enable.dsl=2 | ||
|
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. when did they add this one? We're currently using v20.10.0.5430 -- if it's beyond that, we should add something to the README
Contributor
Author
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. Not sure, but I'm on 22.04.3 and getting this error:
Contributor
Author
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. Update: I found this blog post from July 2020 stating that
It's quitting the pipeline on later versions of Nextflow. See below for a fix to check the version and use the appropriate command |
||
|
|
||
| VERSION = "0.0.1" // Do not edit, controlled by bumpversion. | ||
|
|
||
|
|
||
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