Skip to content

Commit

Permalink
tried replacing nanopolish with f5c, but will keep nanopolish bc idk …
Browse files Browse the repository at this point in the history
…who f5c got screwed here
  • Loading branch information
yuukiiwa committed Sep 18, 2024
1 parent 266d37c commit dd82756
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 37 deletions.
11 changes: 8 additions & 3 deletions modules/local/f5c_index_eventalign.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ process F5C_INDEX_EVENTALIGN {
'quay.io/biocontainers/f5c:1.5--h56e2c18_1' }"

input:
tuple val(meta), path(genome), path(gtf), path(fastq), path(bam), path(bai), path(blow5)
tuple val(meta), path(genome), path(gtf), path(fastqgz), path(bam), path(bai)

output:
tuple val(meta), path(genome), path(gtf), path("*eventalign.txt"), path("*summary.txt"), emit: f5c_outputs
Expand All @@ -20,9 +20,14 @@ process F5C_INDEX_EVENTALIGN {
script:
sample_summary = "$meta.id" +"_summary.txt"
sample_eventalign = "$meta.id" +"_eventalign.txt"
fastq="$meta.id"+".fastq"
fast5 = "$meta.fast5"
fastqi="$fastq"+"*"
"""
f5c index --slow5 $blow5 $fastq
f5c eventalign --reads $fastq --bam $bam --genome $genome --slow5 $blow5 --scale-events --signal-index --summary $sample_summary --threads $task.cpus > $sample_eventalign
gunzip -c $fastqgz > $fastq
f5c index -d $fast5 $fastq
echo $fastqi
f5c eventalign --reads $fastq --bam $bam --genome $genome --scale-events --signal-index --rna --min-mapq 0 --min-recalib-events 1 --summary $sample_summary --threads $task.cpus > $sample_eventalign
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
2 changes: 1 addition & 1 deletion modules/local/gtf2bed.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ process GTF2BED {
'quay.io/biocontainers/perl:5.26.2' }"

input:
tuple path(gtf), val(name)
tuple val(name), path(gtf)

output:
tuple path('*.bed'), val(name), emit: gtf_bed
Expand Down
30 changes: 0 additions & 30 deletions modules/local/slow5tools_f2s_merge.nf

This file was deleted.

8 changes: 5 additions & 3 deletions subworkflows/local/rna_modifications_xpore_m6anet.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@
* RNA MODIFICATION DETECTION WITH XPORE AND M6ANET
*/

include { NANOPOLISH_INDEX_EVENTALIGN } from '../../modules/local/nanopolish_index_eventalign'

// include { F5C_INDEX_EVENTALIGN } from '../../modules/local/f5c_index_eventalign' // f5c works for my other pipeline, but idk how it got screwed here
include { NANOPOLISH_INDEX_EVENTALIGN } from '../../modules/local/nanopolish_index_eventalign' // nanopolish does the job
include { XPORE_DATAPREP } from '../../modules/local/xpore_dataprep'
include { XPORE_DIFFMOD } from '../../modules/local/xpore_diffmod'
include { M6ANET_DATAPREP } from '../../modules/local/m6anet_dataprep'
include { M6ANET_INFERENCE } from '../../modules/local/m6anet_inference'

workflow RNA_MODIFICATION_XPORE_M6ANET {
take:
ch_nanopolish_bam_fast5
ch_bam_fast5

main:

/*
* Align current signals to reference with Nanopolish
*/
NANOPOLISH_INDEX_EVENTALIGN { ch_nanopolish_bam_fast5 }
NANOPOLISH_INDEX_EVENTALIGN { ch_bam_fast5 }
ch_nanopolish_outputs = NANOPOLISH_INDEX_EVENTALIGN.out.nanopolish_outputs
nanopolish_version = NANOPOLISH_INDEX_EVENTALIGN.out.versions

Expand Down
6 changes: 6 additions & 0 deletions workflows/nanoseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ include { GET_TEST_DATA } from '../modules/local/get_test_data'
include { GET_NANOLYSE_FASTA } from '../modules/local/get_nanolyse_fasta'
include { FAST5_TO_POD5 } from '../modules/local/fast5_to_pod5'
include { DORADO } from '../modules/local/dorado'
include { GTF2BED } from '../modules/local/gtf2bed'
include { BAM_RENAME } from '../modules/local/bam_rename'
include { BAMBU } from '../modules/local/bambu'
include { MULTIQC } from '../modules/local/multiqc'
Expand Down Expand Up @@ -346,6 +347,11 @@ workflow NANOSEQ{
ch_fai = CUSTOM_GETCHROMSIZES.out.fai
ch_software_versions = ch_software_versions.mix(CUSTOM_GETCHROMSIZES.out.versions.first().ifEmpty(null))

// will add the following in when nf-core/modules/minimap2/align supports junction bed input
//GTF2BED ( ch_chr_sizes )
//ch_gtf_bed = GTF2BED.out.gtf_bed
//gtf2bed_version = GTF2BED.out.versions

ch_samtools_multiqc = Channel.empty()
if (!params.skip_alignment) {

Expand Down

0 comments on commit dd82756

Please sign in to comment.