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

mapped BAM index not produced in high-throughput (ht) mode #74

Closed
lauren-tjoeka opened this issue Sep 9, 2024 · 9 comments · Fixed by #79
Closed

mapped BAM index not produced in high-throughput (ht) mode #74

lauren-tjoeka opened this issue Sep 9, 2024 · 9 comments · Fixed by #79
Labels
bug Something isn't working

Comments

@lauren-tjoeka
Copy link

Description of the bug

Hi! I was expecting a mapped BAM index to be output alongside the final mapped BAM when running fastquorum in high-throughput mode. Perhaps I'm missing something from my params file (see below). If I'm not missing anything, it would be useful if this was implemented in a future release. Many thanks!

Command used and terminal output

# run command
nextflow run nf-core/fastquorum \
-r dev \
-profile singularity \
-c fastquorum_ht.config \
-params-file fastquorum_params.yaml \
-with-trace trace.txt \
-with-report report.html \
--input samplesheet.csv \
--outdir /scratch/fastquorum

Relevant files

# parameters file: fastquorum

## Main options
mode: "ht"

## fgbio options
duplex_seq: true

## References
fasta: "/GATK.GRCh37/human_g1k_v37_decoy.fasta"
bwa: "/GATK.GRCh37/BWAIndex"
dict: "/GATK.GRCh37/human_g1k_v37_decoy.dict"
fasta_fai: "/GATK.GRCh37/human_g1k_v37_decoy.fasta.fai"
save_reference: false
# config file

// Institute HPC nf-core configuration profile
params {
    config_profile_description = 'Institute HPC cluster profile'
    config_profile_contact     = 'user'
    config_profile_url         = "https://institute.org/"
    monochromeLogs = false
    max_memory = '300.GB'
    max_cpus   = 40
    max_time   = '336.h'
}

// Queue
executor {
    queueSize         = 100
    queueStatInterval = '1 min'
    pollInterval      = '1 min'
    submitRateLimit   = '20 min'
}

// SLURM
process {
    executor = 'slurm'
    cache    = 'lenient'
    beforeScript = 'module load singularity'
    stageInMode = 'symlink'
    queue = { task.time < 2.h ? 'prod_short' : task.time < 24.h ? 'prod_med' : 'prod' } 
    errorStrategy = { task.exitStatus in [1] ? 'retry' : 'finish' }
	withLabel:error_retry {
		errorStrategy = 'retry'
		maxRetries    = 4
	}
    withName: 'NFCORE_FASTQUORUM:FASTQUORUM:FASTQC' {
    cpus = 4 
    memory = '15.GB'
    time = '1h'
    }
    withName: 'NFCORE_FASTQUORUM:FASTQUORUM:FASTQTOBAM' {
    cpus = 2
    memory = '5.GB'
    time = '1h 55m'
    }
    withName: 'NFCORE_FASTQUORUM:FASTQUORUM:ALIGN_RAW_BAM' {
    cpus = 19
    memory = '45.GB'
    time = '1h 55m'
    }
    withName: 'NFCORE_FASTQUORUM:FASTQUORUM:MERGE_BAM' {
    cpus = 4
    memory = '2.GB'
    time = '1h'
    }
    withName: 'NFCORE_FASTQUORUM:FASTQUORUM:GROUPREADSBYUMI' {
    cpus = 4
    memory = '5.GB'
    time = '1h 55m'
    }
    withName: 'NFCORE_FASTQUORUM:FASTQUORUM:COLLECTDUPLEXSEQMETRICS' {
    cpus = 2
    memory = '5.GB'
    time = '1h 55m'
    }
    withName: 'NFCORE_FASTQUORUM:FASTQUORUM:CALLANDFILTERDUPLEXCONSENSUSREADS' {
    cpus = 5
    memory = '20.GB'
    time = '3h'
    }
    withName: 'NFCORE_FASTQUORUM:FASTQUORUM:ALIGN_CONSENSUS_BAM' {
    cpus = 10
    memory = '35.GB'
    time = '4h'
    }

    withName: 'NFCORE_FASTQUORUM:FASTQUORUM:MULTIQC' {
    cpus = 1
    memory = '1.GB'
    time = '1h'
    }

    withName: 'NFCORE_FASTQUORUM:FASTQUORUM:SORTBAM' {
    cpus = 2
    memory = '5.GB'
    time = '1h 55m'
    }
}

// SINGULARITY
// If using custom files using ext.args, you need to mount the folder
singularity {
    enabled = true
	cacheDir = "/path/nextflow"
}



// Overwrite when resuming 
trace {
    overwrite = true
}

report {
    overwrite = true
}


System information

Nextflow version: nextflow/23.04.1
Hardware: HPC
Executor: slurm
Container engine: Singularity
OS: CentOS 7 (rip)
Version of nf-core/fastquorum (from MultiQC Report html): nf-core/fastquorum v1.0.1

@lauren-tjoeka lauren-tjoeka added the bug Something isn't working label Sep 9, 2024
@SPPearce
Copy link
Contributor

I think it may be being made, but not exported. Can you take a look in the working directory for ALIGN_CONSENSUS_BAM?

@lauren-tjoeka
Copy link
Author

thank you! yes it is there

@SPPearce
Copy link
Contributor

This is still an issue that needs fixing.
For now, you can change the publishDir rule for the process to ensure it does get published.

@SPPearce
Copy link
Contributor

Try adding this as a seperate config file for now:

    withName: '.*ALIGN_CONSENSUS_BAM' {
        publishDir = [
            path: { "${params.outdir}/filtering/align_consensus_bam/${meta.id}" },
            mode: params.publish_dir_mode,
            pattern: '*.mapped.bam*'
        ]
    }

@SPPearce
Copy link
Contributor

This should be fixed in the new dev version, so that the index file is actually exported.

@lauren-tjoeka
Copy link
Author

The index files weren't exported.

I got the latest version of the dev branch:
nextflow pull nf-core/fastquorum -r dev

And ran git log dev -1 --format=%cd #Tue Sep 24 13:02:58 2024

@znorgaard
Copy link
Collaborator

@lauren-tjoeka. Odd the tests were passing. I was able to replicate. Looks like it's because of a space in the glob pattern.

#80 should resolve this.

@SPPearce
Copy link
Contributor

SPPearce commented Oct 5, 2024

Ah, didn't notice the space there.
Can you test it is fixed now?

@lauren-tjoeka
Copy link
Author

works great now! thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants