Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoDuarteF committed Nov 6, 2024
2 parents 788ae45 + 0159836 commit e45081d
Show file tree
Hide file tree
Showing 45 changed files with 2,917 additions and 197 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ results/
test.xml
testing*
testing/
work/
work/
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

The pipeline takes a list of genomes and annotations (from raw files or Refseq IDs), and runs commonly used tools to assess their quality.

There will be three different ways you can run this pipeline. 1. Genome only, 2. Annotation only, or 3. Genome and Annotation.
**Only Genome plus Annotation is functional**
There are three different ways you can run this pipeline. 1. Genome only, 2. Annotation only, or 3. Genome and Annotation. **Only Genome plus Annotation is functional**

<!-- TODO nf-core:
For an example, see https://github.com/nf-core/rnaseq/blob/master/README.md#introduction
Expand Down Expand Up @@ -49,6 +48,10 @@ For an example, see https://github.com/nf-core/rnaseq/blob/master/README.md#intr
2. Describes your annotation : `[AGAT]`: Gene, feature, length, averages, counts.
3. Summary with MulitQC.

In addition to the three different modes described above, it is also possible to run the pipeline with or without sequencing reads. When supplying sequencing reads, Merqury can also be run. [Merqury](https://github.com/marbl/merqury) is a tool for genome quality assessment that uses k-mer counts from raw sequencing data to evaluate the accuracy and completeness of a genome assembly. Meryl is the companion tool that efficiently counts and stores k-mers from sequencing reads, enabling Merqury to estimate metrics like assembly completeness and base accuracy. These tools provide a k-mer-based approach to assess assembly quality, helping to identify potential errors or gaps.​

To run the pipeline with reads, you must supply a single FASTQ file for each genome in the samplesheet. It is assumed that reads used to create the assembly are from long read technology such as PacBio or ONT, and are therefore single end. If reads are in a .bam file, they must be converted to FASTQ format first. If you have paired end reads, these must be interleaved first.

## Usage

> [!NOTE]
Expand All @@ -57,31 +60,37 @@ For an example, see https://github.com/nf-core/rnaseq/blob/master/README.md#intr
First, prepare a `samplesheet.csv`, where your input data points to genomes + or annotations:

```csv
species,refseq,fasta,gff
Homo_sapiens,,/path/to/genome.fasta,/path/to/annotation.gff3
Gorilla_gorilla,,/path/to/genome.fasta,
Pan_paniscus,,/path/to/genome.fasta,/path/to/annotation.gff3
species,refseq,fasta,gff,fastq
Homo_sapiens,,/path/to/genome.fasta,/path/to/annotation.gff3,/path/to/reads.fq.gz
Gorilla_gorilla,,/path/to/genome.fasta,,/path/to/reads.fq.gz
Pan_paniscus,,/path/to/genome.fasta,/path/to/annotation.gff3,/path/to/reads.fq.gz
```

Or to Refseq IDs of your species:

```csv
species,refseq,fasta,gff
Pongo_abelii,GCF_028885655.2,,
Macaca_mulatta,GCF_003339765.1,,
species,refseq,fasta,gff,fastq
Pongo_abelii,GCF_028885655.2,,,/path/to/reads.fq.gz
Macaca_mulatta,GCF_003339765.1,,,/path/to/reads.fq.gz
```

You can mix the two input types **(in development)**.

Each row represents a species, with its associated genome, gff or Refseq ID (to autodownload the genome + gff).

You can run the pipeline using test profiles or example input samplesheets:
You can run the pipeline using test profiles or example input samplesheets. To run a test set with a samplesheet containing reads:

```
nextflow run main.nf -resume -profile docker,test --outdir results
```

or
If you supply sequencing reads in your samplesheet, you can still disable merqury by using the parameter `--merqury_skip true`. Alternatively, use a different test profile that does _not_ contain sequencing reads:

```
nextflow run main.nf -resume -profile docker,test_nofastq --outdir results
```

To run this pipeline on an example samplesheet included in the repo assets:

```
nextflow run main.nf -resume -profile docker --input assets/samplesheet.csv --outdir results
Expand All @@ -106,6 +115,8 @@ ecoflow/genomeqc was originally written by Chris Wyatt, Fernando Duarte.

We thank the following people for their extensive assistance in the development of this pipeline:

- [Stephen Turner](https://github.com/stephenturner/) ([Colossal Biosciences](https://colossal.com/))

<!-- TODO nf-core: If applicable, make list of people who have also contributed -->

## Contributions and Support
Expand Down
10 changes: 5 additions & 5 deletions assets/samplesheet.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
species,refseq,fasta,gff
Vespula_vulgaris,GCF_905475345.1,,
Vespa_velutina,GCF_912470025.1,,
Apis_mellifera,GCF_003254395.2,,
Osmia_bicornis,GCF_907164935.1,,
species,refseq,fasta,gff,fastq
Vespula_vulgaris,GCF_905475345.1,,,
Vespa_velutina,GCF_912470025.1,,,
Apis_mellifera,GCF_003254395.2,,,
Osmia_bicornis,GCF_907164935.1,,,
11 changes: 8 additions & 3 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,22 @@
},
"refseq": {
"type": "string",
"errorMessage": "FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
"errorMessage": "RefSeq accession number"
},
"fasta": {
"type": "string",
"format": "file-path",
"errorMessage": "FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
"errorMessage": "FASTA file with genome assembly"
},
"gff": {
"type": "string",
"format": "file-path",
"errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
"errorMessage": "GFF file with genome annotation"
},
"fastq": {
"type": "string",
"format": "file-path",
"errorMessage": "Single compressed FASTQ file, must have extension '.fq.gz' or '.fastq.gz'"
}
},
"required": ["species"]
Expand Down
3 changes: 3 additions & 0 deletions bin/busco_2_table.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/python3

# Written by Chris Wyatt and released under the MIT license.
# Converts a group of busco outputs to a table to plot on a tree

import pandas as pd
import argparse

Expand Down
2 changes: 2 additions & 0 deletions bin/plot_tree_summary.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/Rscript

# Written by Chris Wyatt and released under the MIT license.
# Prints a tree with QUAST N50 results on tips of branches

Expand Down
2 changes: 2 additions & 0 deletions bin/plot_tree_summary2.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/Rscript

# Written by Chris Wyatt and released under the MIT license.
# Plots the phylogenetic tree with BUSCO result in pie charts

Expand Down
3 changes: 3 additions & 0 deletions bin/quast_2_table.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/python3

# Written by Chris Wyatt and released under the MIT license. Converts a group of quast outputs to a table to plot on a tree

import pandas as pd
import argparse
import os
Expand Down
29 changes: 29 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,28 @@ process {
]
}

withName: 'MERQURY_MERQURY' {
publishDir = [
path: { "${params.outdir}/merqury" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: 'MERYL_COUNT' {
publishDir = [
path: { "${params.outdir}/meryl_count" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: 'MERYL_UNIONSUM' {
publishDir = [
path: { "${params.outdir}/meryl_unionsum" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'SORT_BY_LENGTH' {
ext.prefix = { "${meta.id}_sorted" }
}
Expand All @@ -73,4 +95,11 @@ process {
]
}

withName: 'LONGEST' {
publishDir = [
path: { "$params.outdir/output_data/longest" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
}
3 changes: 3 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ params {
// TODO nf-core: Give any required params for the test so that command line flags are not needed
input = params.pipelines_testdata_base_path + 'genomeqc/samplesheet/input_bacteria.csv'

// Run meryl+merqury
merqury_skip = false

}
2 changes: 1 addition & 1 deletion conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

params {
config_profile_name = 'Full test profile'
config_profile_description = 'Full test dataset of hymenpotera genomes'
config_profile_description = 'Full test dataset of Hymenoptera genomes'

input = 'assets/samplesheet.csv'

Expand Down
30 changes: 30 additions & 0 deletions conf/test_nofastq.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run ecoflow/genomeqc -profile test,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'

// Limit resources so that this can run on GitHub Actions
max_cpus = 2
max_memory = '6.GB'
max_time = '6.h'

// Input data
// TODO nf-core: Specify the paths to your test data on nf-core/test-datasets
// TODO nf-core: Give any required params for the test so that command line flags are not needed
input = params.pipelines_testdata_base_path + 'genomeqc/samplesheet/input_bacteria_nofastq.csv'

// Don't try to skip merqury, but since you don't have reads, it shouldn't get run anyway
merqury_skip = false

}
Loading

0 comments on commit e45081d

Please sign in to comment.