Skip to content
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

Subworkflow for organelles #18

Merged
merged 35 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8146f6a
Initial commit for mitohifi
Jun 15, 2023
aa65ab4
Organelle subworkflow
Jun 20, 2023
a9c9622
Work in progress mitohifi
Jun 22, 2023
59801ad
Updates to mitohifi output and testing of the full pipeline
Jun 28, 2023
1b874bf
Code cleanup
Jun 29, 2023
2fe331e
Prettier checks
Jun 29, 2023
a2f987b
Switch polishing on in the config
Jun 29, 2023
57a953b
Refactor emit section for organelles subworkflow
Jul 25, 2023
b8390a2
Merge branch 'dev' into mitohifi
ksenia-krasheninnikova Oct 4, 2023
ccac98f
Fix issues after automatic merge
Oct 4, 2023
d4336a1
Lint and prettify
Oct 4, 2023
57beb02
Concat reads for mitohifi input
Oct 6, 2023
06e304e
Fix merging discrepancies
Oct 6, 2023
53de040
Prettier fix
Oct 6, 2023
e0b1d62
CI testing
Oct 11, 2023
46c609e
Fix syntax error
Oct 11, 2023
7833a35
Add github testing profile to config
Oct 11, 2023
e46fc77
Fix spelling error
Oct 11, 2023
4e91612
Make organelles optional
Oct 12, 2023
21aba97
Switch off extra runs for github test
Oct 12, 2023
d1d9816
Drop redundant lines in emit section
Oct 17, 2023
c820100
Switch off bloom filter for hifiasm
Oct 17, 2023
c9d98f3
Organelles on
Oct 17, 2023
e1803af
Switch off bloom filter for hifiasm
Oct 19, 2023
0c4b577
Prettier modules fix
Oct 19, 2023
dfe8372
Fix error
Oct 19, 2023
e68eb98
Fix CI testing errors
Oct 19, 2023
ab56821
Swtich on polishing and hifiasm hic for githuub
Oct 19, 2023
7c021e8
Fix image path
Oct 19, 2023
0f4f79c
Switch off polishing
Oct 19, 2023
c3df695
Change logic of mitohifi input
Oct 20, 2023
1e80e13
Clean code
Oct 20, 2023
c6d7c9a
Change container path to more basic
Oct 23, 2023
fbbbc59
Update mitohifi to nf-core
Oct 30, 2023
10093d9
Prettier checks
Oct 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ jobs:
with:
version: "${{ matrix.NXF_VER }}"

- name: Download test data
run: |
curl https://darwin.cog.sanger.ac.uk/genomeassembly_test_data.tar.gz | tar xzf -

- name: Run pipeline with test data
# TODO nf-core: You can customise CI pipeline run tests as required
# For example: adding multiple test runs with different parameters
# Remember that you can parallelise this by using strategy.matrix
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
nextflow run ${GITHUB_WORKSPACE} -profile test_github,docker -c conf/hifiasm.config --outdir ./results
4 changes: 4 additions & 0 deletions assets/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ dataset:
hic_motif: GATC,GANTC,CTNAG,TTAA
busco:
lineage: bacteria_odb10
mito:
species: Caradrina clavipalpis
min_length: 15000
code: 5
17 changes: 17 additions & 0 deletions assets/test_github.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
dataset:
id: baUndUnlc1
illumina_10X:
reads: /home/runner/work/genomeassembly/genomeassembly/Undibacterium_unclassified/genomic_data/baUndUnlc1/10x/
pacbio:
reads:
- reads: /home/runner/work/genomeassembly/genomeassembly/Undibacterium_unclassified/genomic_data/baUndUnlc1/pacbio/fasta/HiFi.reads.fasta
HiC:
reads:
- reads: /home/runner/work/genomeassembly/genomeassembly/Undibacterium_unclassified/genomic_data/baUndUnlc1/hic-arima2/41741_2#7.sub.cram
hic_motif: GATC,GANTC,CTNAG,TTAA
busco:
lineage: bacteria_odb10
mito:
species: Caradrina clavipalpis
min_length: 15000
code: 5
26 changes: 15 additions & 11 deletions assets/test_gsMetZobe1.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
samples:
- id: gsMetZobe1
illumina_10X:
reads: /lustre/scratch124/tol/projects/darwin/users/kk16/development/nextflow/gsMetZobe1/10x/
pacbio:
reads:
- reads: /lustre/scratch124/tol/projects/darwin/users/kk16/development/nextflow/gsMetZobe1/pacbio/m64125_200823_145825.ccs.bc1019_BAK8B_OA--bc1019_BAK8B_OA.filtered.fasta.gz
HiC:
reads:
- reads: /lustre/scratch124/tol/projects/darwin/users/kk16/development/nextflow/gsMetZobe1/hic-arima/35528_4#7.cram
arima_motif: GATC,GANTC,CTNAG,TTAA
dataset:
id: gsMetZobe1
illumina_10X:
reads: /lustre/scratch124/tol/projects/darwin/users/kk16/development/nextflow/gsMetZobe1/10x/
pacbio:
reads:
- reads: /lustre/scratch124/tol/projects/darwin/users/kk16/development/nextflow/gsMetZobe1/pacbio/m64125_200823_145825.ccs.bc1019_BAK8B_OA--bc1019_BAK8B_OA.filtered.fasta.gz
HiC:
reads:
- reads: /lustre/scratch124/tol/projects/darwin/users/kk16/development/nextflow/gsMetZobe1/hic-arima/35528_4#7.cram
hic_motif: GATC,GANTC,CTNAG,TTAA
busco:
lineages_path: /lustre/scratch123/tol/resources/busco/v5/
lineage: fungi_odb10
mito:
species: Metschnikowia zobellii
min_length: 15000
code: 4
35 changes: 18 additions & 17 deletions assets/test_iyVesGerm1.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
samples:
- id: iyVesGerm1
assembly:
primary: /lustre/scratch124/tol/projects/darwin/data/insects/Vespula_germanica/working/iyVesGerm1.hifiasm.20201015/iyVesGerm1.p_ctg.fa.gz
haplotigs: /lustre/scratch124/tol/projects/darwin/data/insects/Vespula_germanica/working/iyVesGerm1.hifiasm.20201015/iyVesGerm1.a_ctg.fa.gz
illumina_10X:
reads: /lustre/scratch124/tol/projects/darwin/users/kk16/development/nextflow/sanger-tol-genomeassembly/test/10X_iyVesGerm1
pacbio:
reads:
- reads: /lustre/scratch124/tol/projects/darwin/data/insects/Vespula_germanica/genomic_data/iyVesGerm1/pacbio/fasta/m64094_200217_145414.ccs.bc1011_BAK8A_OA--bc1011_BAK8A_OA.filtered.fasta.gz
HiC:
reads:
- reads: /lustre/scratch124/tol/projects/darwin/data/insects/Vespula_germanica/genomic_data/iyVesGerm1/hic-arima2/34957_3#2.cram
arima_motif: GATC,GANTC,CTNAG,TTAA
busco:
lineages_path: /lustre/scratch123/tol/resources/busco/v5/
lineage: insecta_odb10
dataset:
id: iyVesGerm1
illumina_10X:
reads: /lustre/scratch124/tol/projects/darwin/users/kk16/development/nextflow/sanger-tol-genomeassembly/test/10X_iyVesGerm1
pacbio:
reads:
- reads: /lustre/scratch124/tol/projects/darwin/data/insects/Vespula_germanica/genomic_data/iyVesGerm1/pacbio/fasta/m64094_200217_145414.ccs.bc1011_BAK8A_OA--bc1011_BAK8A_OA.filtered.fasta.gz
HiC:
reads:
- reads: /lustre/scratch124/tol/projects/darwin/data/insects/Vespula_germanica/genomic_data/iyVesGerm1/hic-arima2/34957_3#2.cram
hic_motif: GATC,GANTC,CTNAG,TTAA
busco:
lineages_path: /lustre/scratch123/tol/resources/busco/v5/
lineage: insecta_odb10
mito:
species: Vespula germanica
min_length: 15000
code: 5
18 changes: 18 additions & 0 deletions conf/hifiasm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run sanger-tol/genomeassembly -profile test,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

process {
withName: '.*HIFIASM.*' {
// Skip bloom filter
ext.args = '--primary -f0'
}
}
21 changes: 21 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,27 @@ process {
}
// End of Set up of the raw assembly pipeline

// Set up of organelles pipeline

withName: '.*ORGANELLES_READS:MITOHIFI_MITOHIFI' {
ext.args2 = '-r'
publishDir = [
path: { "${params.outdir}/${meta.id}.${params.hifiasm}/mito.reads" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*ORGANELLES_CONTIGS:MITOHIFI_MITOHIFI' {
ext.args2 = '-c'
publishDir = [
path: { "${params.outdir}/${meta.id}.${params.hifiasm}/mito" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
// End of set up of organelles pipeline

// Set up of the purging pipeline

withName: '.*PURGE_DUPS_PRI:MINIMAP2_ALIGN_READS' {
Expand Down
10 changes: 6 additions & 4 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ params {
hifiasm_hic_on = true
}

// Set up of the scffolding eipeline
withName: 'YAHS' {
// Skip the initial assembly error correction step
ext.args = '-r 1000,2000,5000'
process {
// Set up of the scffolding eipeline
withName: 'YAHS' {
// Skip the initial assembly error correction step
ext.args = '-r 1000,2000,5000'
}
}
36 changes: 36 additions & 0 deletions conf/test_github.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run sanger-tol/genomeassembly -profile test,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

params {
config_profile_name = 'Github test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'

max_cpus = 2
max_memory = '6.GB'
max_time = '6.h'
// Limit resources so that this can run on GitHub Actions

// Input data
input = "${projectDir}/assets/test_github.yaml"
bed_chunks_polishing = 2
polishing_on = false
hifiasm_hic_on = true
organelles_on = false
}

process {
// Set up of the scffolding eipeline
withName: 'YAHS' {
// Skip the initial assembly error correction step
ext.args = '-r 1000,2000,5000'
}
}
16 changes: 16 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,22 @@
"installed_by": ["modules"],
"patch": "modules/nf-core/minimap2/align/minimap2-align.diff"
},
"mitohifi/findmitoreference": {
"branch": "master",
"git_sha": "f52220e84bfc16a8616a5bb3d6f5bc67d601bdce",
"installed_by": ["modules"]
},
"mitohifi/mitohifi": {
"branch": "master",
"git_sha": "02c3c39e3d57bf77183e563598bae2ec1ec11cb1",
"installed_by": ["modules"],
"patch": "modules/nf-core/mitohifi/mitohifi/mitohifi-mitohifi.diff"
},
"multiqc": {
"branch": "master",
"git_sha": "ee80d14721e76e2e079103b8dcd5d57129e584ba",
"installed_by": ["modules"]
},
"pretextmap": {
"branch": "master",
"git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b",
Expand Down
2 changes: 1 addition & 1 deletion modules/local/get_calcuts_params.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process GET_CALCUTS_PARAMS {
conda "conda-forge::python"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/python:3' :
'python:3' }"
'biocontainers/python:3.9' }"
muffato marked this conversation as resolved.
Show resolved Hide resolved

input:
tuple val(meta), path(model_fk)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/keep_seqnames.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process KEEP_SEQNAMES {
conda "conda-forge::coreutils=9.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
'ubuntu:20.04' }"
'docker.io/ubuntu:20.04' }"

input:
tuple val(meta), path(fasta)
Expand Down
47 changes: 47 additions & 0 deletions modules/nf-core/mitohifi/findmitoreference/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions modules/nf-core/mitohifi/findmitoreference/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading