-
Notifications
You must be signed in to change notification settings - Fork 932
Hificnv—copy-number variant caller for PacBio HiFi long-read data #9165
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
chaochaowong
wants to merge
14
commits into
nf-core:master
Choose a base branch
from
chaochaowong:hificnv
base: master
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.
+825
−0
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ec7acce
feat: add hificnv module for CNV calling
chaochaowong 9860960
update stub output
chaochaowong 5e0b6ac
remove hificnv log as output
chaochaowong 0d765a7
fixed input format
chaochaowong 0867427
add crai as a format of bam index
chaochaowong f4b4fd4
use Sequra container for 'hificnv' singularity image and clean up con…
chaochaowong dee623d
use nf-core/test-datasets; not allow exit 65; add maf input for testings
chaochaowong 31b46ae
Merge branch 'master' into hificnv
chaochaowong 5f1f7fb
address inemesb's suggested changes
chaochaowong b469aaa
Allowd CRAM format for aligned/sorted BAM input
chaochaowong 8807232
Corret PacBio's HiFiCNV license
chaochaowong 48477eb
Add testing for optional inputs `--exclude` and `--expected-cn`
chaochaowong 2397a10
Merge branch 'master' into hificnv
chaochaowong 0b15adf
Edited nextflow.config to comply with the nf-test guidence.
chaochaowong 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
| channels: | ||
| - conda-forge | ||
| - bioconda | ||
| dependencies: | ||
| - "bioconda::hificnv=1.0.1" |
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,68 @@ | ||||||
| process HIFICNV { | ||||||
| tag "$meta.id" | ||||||
| label 'process_medium' | ||||||
|
|
||||||
| conda "${moduleDir}/environment.yml" | ||||||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||||||
| 'oras://community.wave.seqera.io/library/hificnv:1.0.1--ba0f622849fdd2bf': | ||||||
| 'community.wave.seqera.io/library/hificnv:1.0.1--b7e433ac6789e2d2' }" | ||||||
|
|
||||||
| input: | ||||||
| tuple val(meta), path(bam), path(bai), path(maf) | ||||||
| tuple val(meta2), path(ref) | ||||||
| tuple val(meta3), path(exclude) | ||||||
| tuple val(meta4), path(expected_cn) | ||||||
|
|
||||||
| output: | ||||||
| tuple val(meta), path("*.copynum.bedgraph"), emit: copynum | ||||||
| tuple val(meta), path("*.depth.bw"), emit: depth | ||||||
| tuple val(meta), path("*.maf.bw"), emit: maf, optional: true | ||||||
| tuple val(meta), path("*.vcf.gz"), emit: vcf | ||||||
| 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}" | ||||||
|
|
||||||
| // handle optional inputs | ||||||
| def maf_arg = maf ? "--maf ${maf}" : "" | ||||||
| def exclude_arg = exclude ? "--exclude ${exclude}" : "" | ||||||
| def expected_cn_arg = expected_cn ? "--expected-cn ${expected_cn}" : "" | ||||||
|
|
||||||
| """ | ||||||
| hificnv \\ | ||||||
| --bam ${bam} \\ | ||||||
| --ref ${ref} \\ | ||||||
| ${maf_arg} \\ | ||||||
| ${exclude_arg} \\ | ||||||
| ${expected_cn_arg} \\ | ||||||
| --threads ${task.cpus} \\ | ||||||
| --output-prefix ${prefix} \\ | ||||||
| ${args} | ||||||
| cat <<-END_VERSIONS > versions.yml | ||||||
| "${task.process}": | ||||||
| hificnv: \$(hificnv --version 2>&1 | sed 's/^.*hificnv //; s/ .*\$//') | ||||||
| END_VERSIONS | ||||||
| """ | ||||||
|
|
||||||
| stub: | ||||||
| def args = task.ext.args ?: '' | ||||||
|
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.
Suggested change
|
||||||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||||||
| def create_maf = maf ? "touch ${prefix}.maf.bw" : "" | ||||||
|
|
||||||
chaochaowong marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| """ | ||||||
| touch ${prefix}.depth.bw | ||||||
| touch ${prefix}.copynum.bedgraph | ||||||
| ${create_maf} | ||||||
| echo "" | gzip > ${prefix}.vcf.gz | ||||||
| cat <<-END_VERSIONS > versions.yml | ||||||
| "${task.process}": | ||||||
| hificnv: \$(hificnv --version 2>&1 | sed 's/^.*hificnv //; s/ .*\$//') | ||||||
|
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.
Suggested change
|
||||||
| END_VERSIONS | ||||||
| """ | ||||||
| } | ||||||
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,121 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
| name: "hificnv" | ||
| description: "Copy number variant calling from PacBio HiFi reads" | ||
| keywords: | ||
| - "copy number variation" | ||
| - "cnv" | ||
| - "PacBio" | ||
| - "HiFi" | ||
| - "long reads" | ||
| - "structural variation" | ||
| tools: | ||
| - "hificnv": | ||
| description: "Copy number variant caller designed for PacBio HiFi reads" | ||
| homepage: "https://github.com/PacificBiosciences/HiFiCNV" | ||
| documentation: "https://github.com/PacificBiosciences/HiFiCNV" | ||
| tool_dev_url: "https://github.com/PacificBiosciences/HiFiCNV" | ||
| doi: "10.1093/bioinformatics/btac808" | ||
| licence: ["Pacific Biosciences Software License Agreement"] | ||
|
|
||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test', single_end:false ]` | ||
| - bam: | ||
| type: file | ||
| description: "Sorted BAM or CRAM file from PacBio HiFi reads" | ||
| pattern: "*.{bam,cram}" | ||
| - bai: | ||
| type: file | ||
| description: BAM index file (CSI, CRAI, or BAI format) | ||
| pattern: "*.{bai,csi,crai}" | ||
| - maf: | ||
| type: file | ||
| description: "Minor allele frequency file (VCF format)" | ||
| pattern: "*.{vcf,vcf.gz}" | ||
| optional: true | ||
| - - meta2: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing reference genome information | ||
| e.g. `[ id:'GATK.GRCh38' ]` | ||
| - ref: | ||
| type: file | ||
| description: "Reference genome FASTA file" | ||
| pattern: "*.{fa,fasta,fa.gz,fasta.gz}" | ||
| - - meta3: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing exclude regions information | ||
| e.g. `[ id:'excluded_regions' ]` | ||
| - exclude: | ||
| type: file | ||
| description: "BED file containing regions to exclude from CNV calling" | ||
| pattern: "*.{bed,bed.gz}" | ||
| optional: true | ||
| - - meta4: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing expected copy number information | ||
| e.g. `[ id:'male_expected_cn' ]` | ||
| - expected_cn: | ||
| type: file | ||
| description: "BED file containing expected copy number regions" | ||
| pattern: "*.{bed,bed.gz}" | ||
| optional: true | ||
|
|
||
| output: | ||
| copynum: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test', single_end:false ]` | ||
| - "*.copynum.bedgraph": | ||
| type: file | ||
| description: "Copy number bedGraph file" | ||
| pattern: "*.copynum.bedgraph" | ||
| depth: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test', single_end:false ]` | ||
| - "*.depth.bw": | ||
| type: file | ||
| description: "Depth coverage bigWig file" | ||
| pattern: "*.depth.bw" | ||
| maf: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test', single_end:false ]` | ||
| - "*.maf.bw": | ||
| type: file | ||
| description: "Minor allele frequency bigWig file" | ||
| pattern: "*.maf.bw" | ||
| optional: true | ||
| vcf: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test', single_end:false ]` | ||
| - "*.vcf.gz": | ||
| type: file | ||
| description: "Copy number variants in VCF format" | ||
| pattern: "*.{vcf.gz}" | ||
| versions: | ||
| - "versions.yml": | ||
| type: file | ||
| description: "File containing software versions" | ||
| pattern: "versions.yml" | ||
|
|
||
| authors: | ||
| - "@chaochaowong" | ||
|
|
||
| maintainers: | ||
| - "@chaochaowong" |
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.