Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlang committed Jun 2, 2023
1 parent e346a3e commit 4deaa05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions subworkflows/local/prepare_genome.nf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ workflow PREPARE_GENOME {
ch_fasta = GUNZIP_FASTA ( [ [:], params.fasta ] ).gunzip.map{ it[1] }
ch_versions = ch_versions.mix(GUNZIP_FASTA.out.versions)
} else {
ch_fasta = file(params.fasta)
ch_fasta = Channel.value(file(params.fasta))
}

//
Expand All @@ -55,14 +55,14 @@ workflow PREPARE_GENOME {
ch_gtf = GUNZIP_GTF ( [ [:], params.gtf ] ).gunzip.map{ it[1] }
ch_versions = ch_versions.mix(GUNZIP_GTF.out.versions)
} else {
ch_gtf = file(params.gtf)
ch_gtf = Channel.value(file(params.gtf))
}
} else if (params.gff) {
if (params.gff.endsWith('.gz')) {
ch_gff = GUNZIP_GFF ( [ [:], params.gff ] ).gunzip.map{ it[1] }
ch_versions = ch_versions.mix(GUNZIP_GFF.out.versions)
} else {
ch_gff = file(params.gff)
ch_gff = Channel.value(file(params.gff))
}
ch_gtf = GFFREAD ( ch_gff ).gtf
ch_versions = ch_versions.mix(GFFREAD.out.versions)
Expand Down Expand Up @@ -123,7 +123,8 @@ workflow PREPARE_GENOME {
//
// Create chromosome sizes file
//
ch_chrom_sizes = CUSTOM_GETCHROMSIZES ( [ [:], ch_fasta ] ).sizes.map{ it[1] }
CUSTOM_GETCHROMSIZES ( ch_fasta.map { [ [:], it ] } )
ch_chrom_sizes = CUSTOM_GETCHROMSIZES.out.sizes.map { it[1] }
ch_fai = CUSTOM_GETCHROMSIZES.out.fai.map{ it[1] }
ch_versions = ch_versions.mix(CUSTOM_GETCHROMSIZES.out.versions)

Expand All @@ -145,7 +146,7 @@ workflow PREPARE_GENOME {
GENOME_BLACKLIST_REGIONS (
ch_chrom_sizes,
ch_blacklist.ifEmpty([]),
params.mito_name,
params.mito_name ?: '',
params.keep_mito
)
ch_genome_filtered_bed = GENOME_BLACKLIST_REGIONS.out.bed
Expand Down
2 changes: 1 addition & 1 deletion workflows/atacseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ workflow ATACSEQ {
MERGED_LIBRARY_ATAQV_ATAQV (
ch_bam_peaks,
'NA',
params.mito_name,
params.mito_name ?: '',
PREPARE_GENOME.out.tss_bed,
[],
PREPARE_GENOME.out.autosomes
Expand Down

0 comments on commit 4deaa05

Please sign in to comment.