Skip to content

Commit

Permalink
Merge pull request #4 from nf-core/dev
Browse files Browse the repository at this point in the history
update dev
  • Loading branch information
subwaystation authored Nov 30, 2020
2 parents 7c5a43e + 5df523c commit d623b34
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/pangenome/pggb:latest
FROM ghcr.io/pangenome/pggb:20201125163549e465b0
LABEL authors="Simon Heumos, Michael Heuer, Lukas Heumos, Erik Garrison, Andrea Guarracino" \
description="Docker image containing all software requirements for the nf-core/pangenome pipeline"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![GitHub Actions CI Status](https://github.com/nf-core/pangenome/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/pangenome/actions)
[![GitHub Actions Linting Status](https://github.com/nf-core/pangenome/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/pangenome/actions)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A520.04.0-brightgreen.svg)](https://www.nextflow.io/)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A520.10.0-brightgreen.svg)](https://www.nextflow.io/)

[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](https://bioconda.github.io/)
[![Docker](https://img.shields.io/docker/automated/nfcore/pangenome.svg)](https://hub.docker.com/r/nfcore/pangenome)
Expand Down
59 changes: 21 additions & 38 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,18 @@

nextflow.enable.dsl = 2

params.input="${baseDir}/**.fa.gz"
params.map_pct_id=90//false
params.align_pct_id=90// false
params.n_secondary=10//false
params.segment_length=1000//false
params.mash_kmer=16
params.min_match_length=8
params.max_block_weight=10000
params.max_path_jump=5000
params.min_subpath=0
params.max_edge_jump=5000
params.max_poa_length=10000
params.do_viz=false
params.do_layout=false
params.do_stats=false
params.consensus_jump_max="10,100,1000,10000"

def makeBaseName = { f -> """\
${f.getSimpleName()}.pggb-\
s${params.segment_length}-\
p${params.map_pct_id}-\
n${params.n_secondary}-\
a${params.align_pct_id}-\
K${params.mash_kmer}-\
k${params.min_match_length}-\
w${params.max_block_weight}-\
j${params.max_path_jump}-\
W${params.min_subpath}-\
e${params.max_edge_jump}\
s${params.edyeet_segment_length}-\
p${params.edyeet_map_pct_id}-\
n${params.edyeet_n_secondary}-\
a${params.edyeet_align_pct_id}-\
K${params.edyeet_mash_kmer}-\
k${params.seqwish_min_match_length}-\
w${params.smoothxg_max_block_weight}-\
j${params.smoothxg_max_path_jump}-\
W${params.smoothxg_min_subpath}-\
e${params.smoothxg_max_edge_jump}\
""" }

fasta = channel.fromPath("${params.input}").map { f -> tuple(makeBaseName(f), f) }
Expand All @@ -53,11 +36,11 @@ process edyeet {

"""
edyeet -X \
-s ${params.segment_length} \
-p ${params.map_pct_id} \
-n ${params.n_secondary} \
-a ${params.align_pct_id} \
-k ${params.mash_kmer} \
-s ${params.edyeet_segment_length} \
-p ${params.edyeet_map_pct_id} \
-n ${params.edyeet_n_secondary} \
-a ${params.edyeet_align_pct_id} \
-k ${params.edyeet_mash_kmer} \
-t ${task.cpus} \
$fasta $fasta \
>${f}.paf
Expand All @@ -78,7 +61,7 @@ process seqwish {
-t ${task.cpus} \
-s $fasta \
-p $alignment \
-k ${params.min_match_length} \
-k ${params.seqwish_min_match_length} \
-g ${f}.seqwish.gfa -P
"""
}
Expand All @@ -97,15 +80,15 @@ process smoothxg {
smoothxg \
-t ${task.cpus} \
-g $graph \
-w ${params.max_block_weight} \
-j ${params.max_path_jump} \
-e ${params.max_edge_jump} \
-l ${params.max_poa_length} \
-w ${params.smoothxg_max_block_weight} \
-j ${params.smoothxg_max_path_jump} \
-e ${params.smoothxg_max_edge_jump} \
-l ${params.smoothxg_max_poa_length} \
-o ${f}.smooth.gfa \
-m ${f}.smooth.maf \
-s ${f}.consensus \
-a \
-C ${params.consensus_jump_max}
-C ${params.smoothxg_consensus_jump_max}
"""
}

Expand Down
38 changes: 33 additions & 5 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,40 @@
// Global default params, used in configs
params {

// Workflow flags
// TODO nf-core: Specify your pipeline's command line flags
genome = false
input = "data/*.fa.gz"
// Input options
input="${baseDir}/**.fa.gz"

// Reporting
do_stats=true

// Edyeet options
edyeet_map_pct_id=90
edyeet_align_pct_id=90
edyeet_n_secondary=10
edyeet_segment_length=1000
edyeet_mash_kmer=16

// Seqwish options
seqwish_min_match_length=8

// Smoothxg options
smoothxg_max_block_weight=10000
smoothxg_max_path_jump=5000
smoothxg_min_subpath=0
smoothxg_max_edge_jump=5000
smoothxg_max_poa_length=10000
smoothxg_consensus_jump_max="10,100,1000,10000"

// Visualization
do_viz = false
do_layout = false

// Output options
outdir = './results'
publish_dir_mode = 'copy'

// Boilerplate options
genome = ''
name = false
multiqc_config = false
email = false
Expand All @@ -27,6 +53,8 @@ params {
igenomes_base = 's3://ngi-igenomes/igenomes/'
tracedir = "${params.outdir}/pipeline_info"
igenomes_ignore = false

// Config options
custom_config_version = 'master'
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
hostnames = false
Expand Down Expand Up @@ -115,7 +143,7 @@ manifest {
homePage = 'https://github.com/nf-core/pangenome'
description = 'The pangenome graph construction pipeline renders a collection of sequences into a pangenome graph. Its goal is to build a graph that is locally directed and acyclic while preserving large-scale variation. Maintaining local linearity is important for interpretation, visualization, mapping, comparative genomics, and reuse of pangenome graphs'
mainScript = 'main.nf'
nextflowVersion = '>=20.04.0'
nextflowVersion = '>=20.10.0'
version = '1.0dev'
}

Expand Down

0 comments on commit d623b34

Please sign in to comment.