-
Notifications
You must be signed in to change notification settings - Fork 150
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
Fix GFFREAD #435
base: dev
Are you sure you want to change the base?
Fix GFFREAD #435
Conversation
Warning Newer version of the nf-core template is available. Your pipeline is using an old version of the nf-core template: 2.14.1. For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation. |
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.
Thanks for the contribution @ftabaro!
I suggested several changes to your PR, if you could address them that would be great
|
||
workflow PREPARE_GENOME { | ||
take: | ||
genome // string: genome name | ||
genomes // map: genome attributes | ||
prepare_tool_index // string : tool to prepare index for | ||
prepare_tool_index // string : tool to prepare index for |
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.
prepare_tool_index // string : tool to prepare index for | |
prepare_tool_index // string: tool to prepare index for |
ch_fasta = GUNZIP_FASTA([[:], fasta]).gunzip.map { it[1] } | ||
ch_versions = ch_versions.mix(GUNZIP_FASTA.out.versions) |
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.
This is actually on purpose and not a mistake to align the equals vertically
ch_fasta = GUNZIP_FASTA([[:], fasta]).gunzip.map { it[1] } | |
ch_versions = ch_versions.mix(GUNZIP_FASTA.out.versions) | |
ch_fasta = GUNZIP_FASTA([[:], fasta]).gunzip.map { it[1] } | |
ch_versions = ch_versions.mix(GUNZIP_FASTA.out.versions) |
ch_gff = GUNZIP_GFF([[:], file(gff, checkIfExists: true)]).gunzip.map { it[1] } | ||
ch_versions = ch_versions.mix(GUNZIP_GFF.out.versions) |
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.
ch_gff = GUNZIP_GFF([[:], file(gff, checkIfExists: true)]).gunzip.map { it[1] } | |
ch_versions = ch_versions.mix(GUNZIP_GFF.out.versions) | |
ch_gff = GUNZIP_GFF([[:], file(gff, checkIfExists: true)]).gunzip.map { it[1] } | |
ch_versions = ch_versions.mix(GUNZIP_GFF.out.versions) |
} | ||
ch_gtf = GFFREAD ( [ [:], ch_gff ] ).gtf | ||
else { | ||
ch_gff = Channel.value(file(gff, checkIfExists: true)) |
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.
ch_gff = Channel.value(file(gff, checkIfExists: true)) | |
ch_gff = Channel.value(file(gff, checkIfExists: true)).map { [ [:], it ] } |
|
||
// | ||
// Detect gff file name stripped of extension and .gz | ||
// | ||
extension = (gff - '.gz').tokenize('.')[-1] | ||
id = file(gff).baseName.toString() - '.gz' - ".${extension}" |
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.
I won't include this bit as we are not doing it for any of the other files
// | |
// Detect gff file name stripped of extension and .gz | |
// | |
extension = (gff - '.gz').tokenize('.')[-1] | |
id = file(gff).baseName.toString() - '.gz' - ".${extension}" |
ch_chromap_index = UNTARFILES([[:], chromap_index]).files | ||
ch_versions = ch_versions.mix(UNTARFILES.out.versions) | ||
} | ||
else { | ||
ch_chromap_index = [[:], file(chromap_index)] |
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.
ch_chromap_index = UNTARFILES([[:], chromap_index]).files | |
ch_versions = ch_versions.mix(UNTARFILES.out.versions) | |
} | |
else { | |
ch_chromap_index = [[:], file(chromap_index)] | |
ch_chromap_index = UNTARFILES([[:], chromap_index]).files | |
ch_versions = ch_versions.mix(UNTARFILES.out.versions) | |
} else { | |
ch_chromap_index = [[:], file(chromap_index)] |
} | ||
else { | ||
ch_chromap_index = CHROMAP_INDEX(ch_fasta.map { [[:], it] }).index | ||
ch_versions = ch_versions.mix(CHROMAP_INDEX.out.versions) |
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.
} | |
else { | |
ch_chromap_index = CHROMAP_INDEX(ch_fasta.map { [[:], it] }).index | |
ch_versions = ch_versions.mix(CHROMAP_INDEX.out.versions) | |
} else { | |
ch_chromap_index = CHROMAP_INDEX(ch_fasta.map { [[:], it] }).index | |
ch_versions = ch_versions.mix(CHROMAP_INDEX.out.versions) |
ch_star_index = UNTAR_STAR_INDEX([[:], star_index]).untar.map { it[1] } | ||
ch_versions = ch_versions.mix(UNTAR_STAR_INDEX.out.versions) | ||
} | ||
else { |
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.
ch_star_index = UNTAR_STAR_INDEX([[:], star_index]).untar.map { it[1] } | |
ch_versions = ch_versions.mix(UNTAR_STAR_INDEX.out.versions) | |
} | |
else { | |
ch_star_index = UNTAR_STAR_INDEX([[:], star_index]).untar.map { it[1] } | |
ch_versions = ch_versions.mix(UNTAR_STAR_INDEX.out.versions) | |
} else { |
} | ||
else { | ||
ch_star_index = STAR_GENOMEGENERATE(ch_fasta, ch_gtf).index | ||
ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions) |
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.
} | |
else { | |
ch_star_index = STAR_GENOMEGENERATE(ch_fasta, ch_gtf).index | |
ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions) | |
} else { | |
ch_star_index = STAR_GENOMEGENERATE(ch_fasta, ch_gtf).index | |
ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions) |
fasta = ch_fasta // path: genome.fasta | ||
fai = ch_fai // path: genome.fai | ||
gtf = ch_gtf // path: genome.gtf | ||
gene_bed = ch_gene_bed // path: gene.bed | ||
chrom_sizes = ch_chrom_sizes // path: genome.sizes | ||
filtered_bed = ch_genome_filtered_bed // path: *.include_regions.bed | ||
bwa_index = ch_bwa_index // path: bwa/index/ | ||
bowtie2_index = ch_bowtie2_index // path: bowtie2/index/ | ||
chromap_index = ch_chromap_index // path: genome.index | ||
star_index = ch_star_index // path: star/index/ | ||
versions = ch_versions.ifEmpty(null) // channel: [ versions.yml ] |
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.
Here the comments were aligned
fasta = ch_fasta // path: genome.fasta | |
fai = ch_fai // path: genome.fai | |
gtf = ch_gtf // path: genome.gtf | |
gene_bed = ch_gene_bed // path: gene.bed | |
chrom_sizes = ch_chrom_sizes // path: genome.sizes | |
filtered_bed = ch_genome_filtered_bed // path: *.include_regions.bed | |
bwa_index = ch_bwa_index // path: bwa/index/ | |
bowtie2_index = ch_bowtie2_index // path: bowtie2/index/ | |
chromap_index = ch_chromap_index // path: genome.index | |
star_index = ch_star_index // path: star/index/ | |
versions = ch_versions.ifEmpty(null) // channel: [ versions.yml ] | |
fasta = ch_fasta // path: genome.fasta | |
fai = ch_fai // path: genome.fai | |
gtf = ch_gtf // path: genome.gtf | |
gene_bed = ch_gene_bed // path: gene.bed | |
chrom_sizes = ch_chrom_sizes // path: genome.sizes | |
filtered_bed = ch_genome_filtered_bed // path: *.include_regions.bed | |
bwa_index = ch_bwa_index // path: bwa/index/ | |
bowtie2_index = ch_bowtie2_index // path: bowtie2/index/ | |
chromap_index = ch_chromap_index // path: genome.index | |
star_index = ch_star_index // path: star/index/ | |
versions = ch_versions.ifEmpty(null) // channel: [ versions.yml ] |
This pull request resolves #432. It fixes the call to GFFREAD by adding a second argument that is an empty list. In addition, this pull requests implement detection of gff file name and passes it as
meta.id
to GFFREAD generating a coherently named gtf output file.PR checklist
nf-core lint
).nextflow run . -profile test,docker --outdir <OUTDIR>
).