-
Notifications
You must be signed in to change notification settings - Fork 0
Initiate module for cell-type-ewings #131
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
7cb5d69
aucell script
allyhawkins f74c4e5
workflow and params for ewing cell typing
allyhawkins 9496729
ewing readme
allyhawkins 0d50838
account for not enough gene overlap
allyhawkins f466c5e
add params to schema
allyhawkins 95e0f6c
write the output not read
allyhawkins b8e0d84
fix a typo
allyhawkins 82ae052
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 70af9fe
Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"
allyhawkins e9516ba
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 85cd5b1
temporarily turn off auto fix PRs
allyhawkins 2dc78ec
Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"
allyhawkins 039b0a7
add typos rule for aucThr
jashapiro a2a4034
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 90d9ff0
use identifier, not word
jashapiro aae0ad3
don't need to redefine types
jashapiro 08c5bee
Merge pull request #132 from AlexsLemonade/jashapiro/typos-thr
jashapiro 88a7e5f
use v0.2.2
allyhawkins 6bc6594
name output
allyhawkins 3c60e89
use correct tagged link
allyhawkins 38b5423
add descriptions to schema
allyhawkins 981aef5
Merge remote-tracking branch 'origin/allyhawkins/ewing-cell-types-par…
allyhawkins 46006c1
don't comment out other modules
allyhawkins 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| This module assigns cell types to all Ewing sarcoma samples in `SCPCP000015`. | ||
|
|
||
| Scripts are derived from the the `cell-type-ewings` module of the [OpenScPCA-analysis](https://github.com/AlexsLemonade/OpenScPCA-analysis) repository. | ||
|
|
||
| Links to specific original scripts used in this module: | ||
|
|
||
| - `01-aucell.R`: <https://github.com/AlexsLemonade/OpenScPCA-analysis/blob/main/analyses/cell-type-ewings/scripts/aucell-ews-signatures/01-aucell.R> | ||
|
|
||
| This module also uses the following reference files found in the `OpenScPCA-analysis` repository: | ||
|
|
||
| - `aynaud-ews-targets.tsv` : <https://github.com/AlexsLemonade/OpenScPCA-analysis/refs/tags/v0.2.1/analyses/cell-type-ewings/references/gene_signatures/aynaud-ews-targets.tsv> | ||
| - `wrenn-nt5e-genes.tsv`: <https://github.com/AlexsLemonade/OpenScPCA-analysis/refs/tags/v0.2.1/analyses/cell-type-ewings/references/gene_signatures/wrenn-nt5e-genes.tsv> | ||
| - `msigdb-gene-sets.tsv`: <https://github.com/AlexsLemonade/OpenScPCA-analysis/refs/tags/v0.2.1/analyses/cell-type-ewings/references/msigdb-gene-sets.tsv> | ||
allyhawkins marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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 |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| #!/usr/bin/env nextflow | ||
|
|
||
| // Workflow to assign consensus cell type labels | ||
|
|
||
| process ewing_aucell { | ||
| container params.cell_type_ewing_container | ||
| tag "${project_id}" | ||
| label 'mem_8' | ||
| publishDir "${params.results_bucket}/${params.release_prefix}/cell-type-ewings/${project_id}/${sample_id}", mode: 'copy' | ||
| input: | ||
| tuple val(sample_id), | ||
| val(project_id), | ||
| path(library_files) | ||
| val auc_max_rank | ||
| path msigdb_list | ||
| path ews_high_list | ||
| path ews_low_list | ||
| output: | ||
| tuple val(sample_id), | ||
| val(project_id), | ||
| path(aucell_output_files) | ||
| script: | ||
| aucell_output_files = library_files | ||
| .collect{ | ||
| it.name.replaceAll(/(?i).rds$/, "_ewing-aucell-results.tsv.gz") | ||
| } | ||
| // combine the custom gene sets into a single input | ||
| custom_geneset_files = [ews_high_list, ews_low_list].join(",") | ||
| """ | ||
| for file in ${library_files}; do | ||
| aucell.R \ | ||
| --sce_file \$file \ | ||
| --custom_geneset_files ${custom_geneset_files} \ | ||
| --msigdb_genesets ${msigdb_list} \ | ||
| --max_rank_threshold ${auc_max_rank} \ | ||
| --output_file \$(basename \${file%.rds}_ewing-aucell-results.tsv.gz) \ | ||
| --threads ${task.cpus} \ | ||
| --seed 2025 | ||
| done | ||
| """ | ||
|
|
||
| stub: | ||
| aucell_output_files = library_files | ||
| .collect{ | ||
| it.name.replaceAll(/(?i).rds$/, "_ewing-aucell-results.tsv.gz") | ||
| } | ||
| """ | ||
| for file in ${library_files}; do | ||
| touch \$(basename \${file%.rds}_ewing-aucell-results.tsv.gz) | ||
| done | ||
| """ | ||
| } | ||
|
|
||
|
|
||
|
|
||
| workflow cell_type_ewings { | ||
| take: | ||
| sample_ch // [sample_id, project_id, sample_path] | ||
| main: | ||
| // create [sample_id, project_id, [list of processed files]] | ||
| libraries_ch = sample_ch | ||
| .map{sample_id, project_id, sample_path -> | ||
| def library_files = Utils.getLibraryFiles(sample_path, format: "sce", process_level: "processed") | ||
| return [sample_id, project_id, library_files] | ||
| } | ||
| // only run on SCPCP000015 with Ewing sarcoma samples | ||
| .filter{ it[1] == "SCPCP000015" } | ||
|
|
||
| // run aucell on ewing gene sets | ||
| ewing_aucell( | ||
| libraries_ch, | ||
| params.cell_type_ewings_auc_max_rank, | ||
| file(params.cell_type_ewings_msigdb_list), | ||
| file(params.cell_type_ewings_ews_high_list), | ||
| file(params.cell_type_ewings_ews_low_list) | ||
| ) | ||
|
|
||
| emit: | ||
| ewing_aucell.out // [sample_id, project_id, [list of aucell_output_files]] | ||
allyhawkins marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
Oops, something went wrong.
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.
Use a tag or permalink here, please.