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

Import fasta_fai in main.nf #85

Merged
merged 4 commits into from
Apr 30, 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
7 changes: 2 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ If you're not used to this workflow with git, you can start with some [docs from

## Tests

You have the option to test your changes locally by running the pipeline. For receiving warnings about process selectors and other `debug` information, it is recommended to use the debug profile. Execute all the tests with the following command:

```bash
nf-test test --profile debug,test,docker --verbose
```
You can optionally test your changes by running the pipeline locally. Then it is recommended to use the `debug` profile to
receive warnings about process selectors and other debug info. Example: `nextflow run . -profile debug,test,docker --outdir <OUTDIR>`.

When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests.
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.
Expand Down
5 changes: 1 addition & 4 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_bamt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

// TODO nf-core: Remove this line if you don't need a FASTA file
// This is an example of how to use getGenomeAttribute() to fetch parameters
// from igenomes.config using `--genome`
params.fasta = getGenomeAttribute('fasta')
// params.fasta_fai = getGenomeAttribute(params, 'fasta_fai')
params.fasta_fai = getGenomeAttribute('fasta_fai')

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
7 changes: 2 additions & 5 deletions workflows/bamtofastq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ include { paramsSummaryMultiqc; softwareVersionsToYAML } from '../subworkflows/n

// Initialize file channels based on params
fasta = params.fasta ? Channel.fromPath(params.fasta).collect() : Channel.value([])
fasta_fai = params.fasta_fai ? Channel.fromPath(params.fasta_fai).collect() : Channel.value([])

// Initialize value channels based on params
chr = params.chr ?: Channel.empty()
Expand Down Expand Up @@ -72,12 +71,9 @@ workflow BAMTOFASTQ {

ch_versions = ch_versions.mix(PREPARE_INDICES.out.versions)

fasta_fai = params.fasta ? params.fasta_fai ? Channel.fromPath(params.fasta_fai).collect() : PREPARE_INDICES.out.fasta_fai : Channel.value([])

ch_input = PREPARE_INDICES.out.ch_input_indexed

// SUBWORKFLOW: Pre conversion QC and stats

ch_input = PREPARE_INDICES.out.ch_input_indexed
PRE_CONVERSION_QC(
ch_input,
fasta
Expand Down Expand Up @@ -163,6 +159,7 @@ workflow BAMTOFASTQ {
// SUBWORKFLOW: PAIRED-END Alignment to FastQ
//

fasta_fai = params.fasta ? params.fasta_fai ? Channel.fromPath(params.fasta_fai).collect() : PREPARE_INDICES.out.fasta_fai : Channel.value([])
ALIGNMENT_TO_FASTQ (
conversion_input.ch_paired,
fasta,
Expand Down
Loading