-
Notifications
You must be signed in to change notification settings - Fork 717
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
Add Vireo to modules #5576
Merged
Merged
Add Vireo to modules #5576
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7855326
add vireo
wxicu 719e2ec
align
wxicu 773b91e
fix test
wxicu 8fd69ea
fix test
wxicu 9357e2e
remove cellsnp, add test snatshot
ffefe40
align
wxicu bc6e3a6
add snapshot
859a10a
Merge branch 'master' into vireo
wxicu a81a4fd
Merge branch 'master' into vireo
wxicu 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 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,9 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
name: "vireo" | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- "bioconda::vireosnp=0.5.8" |
This file contains 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,62 @@ | ||
process VIREO { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/vireosnp:0.5.8--pyh7cba7a3_0' : | ||
'biocontainers/vireosnp:0.5.8--pyh7cba7a3_0' }" | ||
|
||
input: | ||
tuple val(meta), path(cell_data), val(n_donor), path(donor_file), path(vartrix_data) | ||
output: | ||
tuple val(meta), path('*_summary.tsv') , emit: summary | ||
tuple val(meta), path('*_donor_ids.tsv') , emit: donor_ids | ||
tuple val(meta), path('*_prob_singlet.tsv.gz'), emit: prob_singlets | ||
tuple val(meta), path('*_prob_doublet.tsv.gz'), emit: prob_doublets | ||
path 'versions.yml' , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
def input = cell_data ? "-c ${cell_data}" : "--vartrixData ${vartrix_data}" | ||
|
||
""" | ||
vireo \\ | ||
$input \\ | ||
-N ${n_donor} \\ | ||
-d ${donor_file} \\ | ||
-p $task.cpus \\ | ||
-o . \\ | ||
$args | ||
|
||
mv summary.tsv ${prefix}_summary.tsv | ||
mv donor_ids.tsv ${prefix}_donor_ids.tsv | ||
mv prob_singlet.tsv.gz ${prefix}_prob_singlet.tsv.gz | ||
mv prob_doublet.tsv.gz ${prefix}_prob_doublet.tsv.gz | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
vireo: \$(vireo | sed '1!d ; s/Welcome to vireoSNP //; s/!//') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
||
""" | ||
touch ${prefix}_summary.tsv | ||
touch ${prefix}_donor_ids.tsv | ||
echo "" | gzip > ${prefix}_prob_singlet.tsv.gz | ||
echo "" | gzip > ${prefix}_prob_doublet.tsv.gz | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
vireo: \$(vireo | sed '1!d ; s/Welcome to vireoSNP //; s/!//') | ||
END_VERSIONS | ||
""" | ||
} |
This file contains 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,82 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "vireo" | ||
description: Use vireo to perform donor deconvolution for multiplexed scRNA-seq data | ||
keywords: | ||
- genotype-based demultiplexing | ||
- donor deconvolution | ||
- cellsnp | ||
tools: | ||
- "vireo": | ||
description: "vireoSNP - donor deconvolution for multiplexed scRNA-seq data" | ||
homepage: "https://vireosnp.readthedocs.io/en/latest/" | ||
documentation: "https://vireosnp.readthedocs.io/en/latest/" | ||
tool_dev_url: "https://github.com/single-cell-genetics/vireo" | ||
doi: "10.1186/s13059-019-1865-2" | ||
licence: ["Apache-2.0"] | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1']` | ||
|
||
- cell_data: | ||
type: file | ||
description: The cell genotype file in VCF format or cellSNP folder with sparse matrices. | ||
pattern: "*.vcf|*/" | ||
- n_donor: | ||
type: integer | ||
description: Number of donors to demultiplex. | ||
- donor_file: | ||
type: file | ||
description: The optional donor genotype file in VCF format. | ||
pattern: "*.vcf" | ||
- vartrix_data: | ||
type: file | ||
description: The optional cell genotype files in vartrix outputs. | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1' ]` | ||
|
||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
- summary: | ||
type: file | ||
description: Summary tsv file of deconvolution result. | ||
pattern: "*_summary.tsv" | ||
|
||
- donor_ids: | ||
type: file | ||
description: Donor assignment with detailed statistics. | ||
pattern: "*_donor_ids.tsv" | ||
|
||
- prob_singlets: | ||
type: file | ||
description: contains probability of classifing singlets | ||
pattern: "*_prob_singlet.tsv.gz" | ||
|
||
- prob_doublets: | ||
type: file | ||
description: contains probability of classifing doublets | ||
pattern: "*_prob_doublet.tsv.gz" | ||
|
||
authors: | ||
- "@mari-ga" | ||
- "@maxozo" | ||
- "@wxicu" | ||
- "@Zethson" | ||
|
||
maintainers: | ||
- "@mari-ga" | ||
- "@maxozo" | ||
- "@wxicu" | ||
- "@Zethson" |
This file contains 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,90 @@ | ||
// nf-core modules test vireo | ||
nextflow_process { | ||
|
||
name "Test Process VIREO" | ||
script "../main.nf" | ||
process "VIREO" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "vireo" | ||
tag "samtools/index" | ||
tag "cellsnp/modea" | ||
|
||
test("demultiplexing") { | ||
setup { | ||
run("SAMTOOLS_INDEX") { | ||
script "../../samtools/index/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'sample1' ], | ||
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/chr21.bam', checkIfExists: true) ] | ||
""" | ||
} | ||
} | ||
run("CELLSNP_MODEA") { | ||
script "../../cellsnp/modea/main.nf" | ||
process { | ||
""" | ||
input[0] = SAMTOOLS_INDEX.out.bai.collect{ meta, bai -> bai }.map{ | ||
bai -> [[id: 'sample1'], | ||
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/chr21.bam', checkIfExists: true), | ||
bai, | ||
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/donor_genotype_chr21.vcf', checkIfExists: true), | ||
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/barcodes.tsv', checkIfExists: true)]} | ||
""" | ||
} | ||
} | ||
} | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = CELLSNP_MODEA.out.cell.collect{ meta, cell -> cell }.map{ | ||
cell -> [[id:'test'], | ||
cell, | ||
2, | ||
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/donor_genotype_chr21.vcf', checkIfExists: true), | ||
[] | ||
]} | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("demultiplexing - stub") { | ||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [[id:'sample1'], | ||
[], | ||
2, | ||
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/donor_genotype_chr21.vcf', checkIfExists: true), | ||
[] | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.
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.
Is
-N
mandatory?