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

add yahs to workflow #321

Merged
merged 10 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
EditorConfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4

- name: Install editorconfig-checker
run: npm install -g editorconfig-checker
run: npm install -g editorconfig-checker@3.0.2

- name: Run ECLint check
run: editorconfig-checker -exclude README.md $(find .* -type f | grep -v '.git\|.py\|.md\|json\|yml\|yaml\|html\|css\|work\|.nextflow\|build\|nf_core.egg-info\|log.txt\|Makefile')
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ This is a gitpod set up for BGA23 with a version of TreeVal, although for now gi
The treeval pipeline has a sister pipeline currently named [curationpretext](https://github.com/sanger-tol/curationpretext) which acts to regenerate the pretext maps and accessory files during genomic curation in order to confirm interventions. This pipeline is sufficiently different to the treeval implementation that it is written as it's own pipeline.

1. Parse input yaml ( YAML_INPUT )
2. Generate my.genome file ( GENERATE_GENOME )
3. Generate insilico digests of the input assembly ( INSILICO_DIGEST )
2. Generate chromosome size file ( GENERATE_GENOME )
3. Generate Bionano insilico digests of the input assembly ( INSILICO_DIGEST )
4. Generate gene alignments with high quality data against the input assembly ( GENE_ALIGNMENT )
5. Generate a repeat density graph ( REPEAT_DENSITY )
6. Generate a gap track ( GAP_FINDER )
Expand Down
Binary file removed bin/FKprof
Binary file not shown.
Binary file removed bin/find_telomere
Binary file not shown.
12 changes: 12 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ process {
]
}

withName: YAHS {
publishDir = [
path: { "${params.outdir}/hic_files/alignment_bin" },
mode: params.publish_dir_mode
]
}

//
// MODULE CONFIGS
//
Expand Down Expand Up @@ -107,6 +114,11 @@ process {
ext.prefix = { "${meta.id}.juicer.sorted" }
}

withName: ".*:.*:HIC_MAPPING:YAHS" {
ext.prefix = { "${meta.id}.alignment" }
ext.args = "--convert-to-binary"
}

//
// SUBWORKFLOW: SELFCOMP
//
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"yahs": {
"branch": "master",
"git_sha": "d3a3d04073af68437f07e0fb9b88aa6172c3f678",
"installed_by": ["modules"]
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion modules/local/find_telomere_regions.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process FIND_TELOMERE_REGIONS {
tag "${meta.id}"
label 'process_low'

container 'docker.io/library/gcc:10.4.0'
container 'quay.io/sanger-tol/telomere:0.0.1-c1'

input:
tuple val( meta ), path( file )
Expand Down
5 changes: 5 additions & 0 deletions modules/nf-core/yahs/environment.yml

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

51 changes: 51 additions & 0 deletions modules/nf-core/yahs/main.nf

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

78 changes: 78 additions & 0 deletions modules/nf-core/yahs/meta.yml

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

54 changes: 54 additions & 0 deletions modules/nf-core/yahs/tests/main.nf.test

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

37 changes: 37 additions & 0 deletions modules/nf-core/yahs/tests/main.nf.test.snap

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

6 changes: 6 additions & 0 deletions modules/nf-core/yahs/tests/nextflow.config

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

4 changes: 3 additions & 1 deletion subworkflows/local/generate_genome.nf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ workflow GENERATE_GENOME {
ch_genomesize = GENERATE_SORTED_GENOME.out.genomesize
ch_genome_fai = GENERATE_SORTED_GENOME.out.ref_index
ch_versions = GENERATE_SORTED_GENOME.out.versions
ch_ref = GENERATE_SORTED_GENOME.out.fasta

//
// SUBWORKFLOW: GENERATE UNSORTED CHROMOSOME SIZES FILE (DEFINED BY USER)
Expand All @@ -58,6 +59,7 @@ workflow GENERATE_GENOME {
ch_versions = ch_versions.mix( GENERATE_UNSORTED_GENOME.out.versions )
ch_genomesize = ch_genomesize.mix( GENERATE_UNSORTED_GENOME.out.genomesize )
ch_genome_fai = ch_genome_fai.mix( GENERATE_UNSORTED_GENOME.out.ref_index )
ch_ref = ch_ref.mix( GENERATE_UNSORTED_GENOME.out.fasta )
ch_versions = GENERATE_UNSORTED_GENOME.out.versions

//
Expand All @@ -73,6 +75,6 @@ workflow GENERATE_GENOME {
max_scaff_size = GET_LARGEST_SCAFF.out.scaff_size.toInteger()
dot_genome = ch_genomesize
ref_index = ch_genome_fai
ref = reference_file
ref = ch_ref
versions = ch_versions.ifEmpty(null)
}
1 change: 1 addition & 0 deletions subworkflows/local/generate_sorted_genome.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ workflow GENERATE_SORTED_GENOME {
emit:
genomesize = GNU_SORT.out.sorted
ref_index = CUSTOM_GETCHROMSIZES.out.fai
fasta = CUSTOM_GETCHROMSIZES.out.fasta
versions = ch_versions.ifEmpty(null)
}
1 change: 1 addition & 0 deletions subworkflows/local/generate_unsorted_genome.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ workflow GENERATE_UNSORTED_GENOME {

genomesize = CUSTOM_GETCHROMSIZES.out.sizes
ref_index = CUSTOM_GETCHROMSIZES.out.fai
fasta = CUSTOM_GETCHROMSIZES.out.fasta
versions = ch_versions.ifEmpty(null)
}
17 changes: 17 additions & 0 deletions subworkflows/local/hic_mapping.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ include { PRETEXTSNAPSHOT as SNAPSHOT_SRES } from '../../modules/
include { GENERATE_CRAM_CSV } from '../../modules/local/generate_cram_csv'
include { JUICER_TOOLS_PRE } from '../../modules/local/juicer_tools_pre'
include { SUBSAMPLE_BAM } from '../../modules/local/subsample_bam.nf'
include { YAHS } from '../../modules/nf-core/yahs/main'
include { PRETEXT_INGESTION as PRETEXT_INGEST_SNDRD } from '../../subworkflows/local/pretext_ingestion'
include { PRETEXT_INGESTION as PRETEXT_INGEST_HIRES } from '../../subworkflows/local/pretext_ingestion'
include { HIC_BAMTOBED as HIC_BAMTOBED_COOLER } from '../../subworkflows/local/hic_bamtobed'
Expand All @@ -28,6 +29,7 @@ workflow HIC_MAPPING {
reference_tuple // Channel: tuple [ val(meta), path( file ) ]
reference_index // Channel: tuple [ val(meta), path( file ) ]
dot_genome // Channel: tuple [ val(meta), path( datafile ) ]
ref_yahs // Channel: path( file )
hic_reads_path // Channel: tuple [ val(meta), path( directory ) ]
assembly_id // Channel: val( id )
gap_file // Channel: tuple [ val(meta), path( file ) ]
Expand Down Expand Up @@ -106,6 +108,21 @@ workflow HIC_MAPPING {
ch_versions = ch_versions.mix( HIC_BWAMEM2.out.versions )
mergedbam = mergedbam.mix(HIC_BWAMEM2.out.mergedbam)

//
// LOGIC: MAKE YAHS INPUT
//
ref_yahs.map { meta, ref -> ref }.set{ch_ref}
reference_index.map { meta, fai -> fai }.set{ch_fai}

//
// MODULE: RUN YAHS TO GENERATE ALIGNMENT BIN FILE
//
YAHS (
mergedbam,
ch_ref,
ch_fai
)

//
// LOGIC: PREPARING PRETEXT MAP INPUT
//
Expand Down
1 change: 1 addition & 0 deletions workflows/treeval.nf
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ workflow TREEVAL {
YAML_INPUT.out.reference_ch,
GENERATE_GENOME.out.ref_index,
GENERATE_GENOME.out.dot_genome,
GENERATE_GENOME.out.ref,
YAML_INPUT.out.hic_reads_ch,
YAML_INPUT.out.assembly_id,
GAP_FINDER.out.gap_file,
Expand Down
Loading
Loading