Skip to content

Commit

Permalink
adding MOP3
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacozzuto committed Oct 1, 2024
1 parent 8cca812 commit c8b204a
Show file tree
Hide file tree
Showing 162 changed files with 3,145 additions and 2,104 deletions.
40 changes: 29 additions & 11 deletions INSTALL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,49 @@
# params:
# 1 guppy version

if [ -e "./mop_preprocess/bin/guppy_basecaller" ] ; then
echo "unlinking previously installed versions"
cd mop_preprocess/bin; find . -maxdepth 1 -type l | xargs rm; cd ../../
fi

if [ x"$1" == x ]; then
GUPPY_VER='3.4.5'
else
GUPPY_VER=$1
fi


wget https://cdn.oxfordnanoportal.com/software/analysis/ont-guppy_${GUPPY_VER}_linux64.tar.gz
wget https://cdn.oxfordnanoportal.com/software/analysis/ont-guppy_${GUPPY_VER}_linux64.tar.gz
if [ $? -eq 0 ]; then
echo "INSTALLING GUPPY VERSION ${GUPPY_VER}"
else
echo "GUPPY VERSION ${GUPPY_VER} is not found"
echo "GUPPY VERSION ${GUPPY_VER} is not found"
exit
fi

tar -zvxf ont-guppy_${GUPPY_VER}_linux64.tar.gz
mv ont-guppy mop_preprocess/bin/

wget https://biocore.crg.eu/public/mop3_pub/models.tar
mv models.tar mop_preprocess/guppy_models/
cd mop_preprocess/guppy_models; tar -xvf models.tar; rm models.tar; cd ../../

mkdir -p mop_preprocess/bin/ont-guppy_${GUPPY_VER}
mv ont-guppy/* mop_preprocess/bin/ont-guppy_${GUPPY_VER}
for i in mop_preprocess/guppy_models/*.gz; do gzip -cd $i > mop_preprocess/bin/ont-guppy_${GUPPY_VER}/data/`basename $i .gz`; done
rmdir ont-guppy

cd mop_preprocess/bin
ln -sf ont-guppy/bin/guppy_* .
ln -sf ont-guppy/lib/* .
ln -s ont-guppy_${GUPPY_VER}/bin/guppy_* .
ln -s ont-guppy_${GUPPY_VER}/lib/* .
cd ../../
if [ ! -e "mop_preprocess/bin/ont-guppy/lib/libz.so" ] ; then
unlink mop_preprocess/bin/ont-guppy/lib/libz.so
cd mop_preprocess/bin/ont-guppy/lib/
ln -sf libz.so.1 libz.so
cd ../../../../

if [ ! -e "./mop_preprocess/bin/ont-guppy_${GUPPY_VER}/lib/libz.so" ] ; then
if [ -e "./mop_preprocess/bin/ont-guppy_${GUPPY_VER}/lib/libz.so.1" ] ; then
unlink mop_preprocess/bin/ont-guppy_${GUPPY_VER}/lib/libz.so
cd mop_preprocess/bin/ont-guppy_${GUPPY_VER}/lib/
ln -s libz.so.1 libz.so
cd ../../../../
fi
fi
rm ont-guppy_${GUPPY_VER}_linux64.tar.gz

rm ./ont-guppy_${GUPPY_VER}_linux64.tar.gz
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Biocore@CRG
Copyright (c) 2022 Biocore@CRG

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
52 changes: 34 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,67 @@
# MoP2- DSL2 version of Master of Pores
# MoP3 - Master of Pores 3
[![Docker Build Status](https://img.shields.io/docker/automated/biocorecrg/nanopore.svg)](https://cloud.docker.com/u/biocorecrg/repository/docker/biocorecrg/nanopore/builds)
[![mop2-CI](https://github.com/biocorecrg/MoP2/actions/workflows/build.yml/badge.svg)](https://github.com/biocorecrg/MoP2/actions/workflows/build.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![mop3-CI](https://github.com/biocorecrg/master_of_pores/actions/workflows/build.yml/badge.svg)](https://github.com/biocorecrg/master_of_pores/actions/workflows/build.yml)[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Nextflow version](https://img.shields.io/badge/Nextflow-21.04.1-brightgreen)](https://www.nextflow.io/)
[![Nextflow DSL2](https://img.shields.io/badge/Nextflow-DSL2-brightgreen)](https://www.nextflow.io/)
[![Singularity version](https://img.shields.io/badge/Singularity-v3.2.1-green.svg)](https://www.sylabs.io/)
[![Docker version](https://img.shields.io/badge/Docker-v20.10.8-blue)](https://www.docker.com/)

<br/>

![MOP2](https://github.com/biocorecrg/MoP2/blob/main/img/master_red.jpg?raw=true)


Inspired by Metallica's [Master Of Puppets](https://www.youtube.com/watch?v=S7blkui3nQc)
<img align="right" href="https://biocore.crg.eu/" src="https://raw.githubusercontent.com/CRG-CNAG/BioCoreMiscOpen/master/logo/biocore-logo_small.png" />


Master of Pores is a pipeline written in Nextflow DSL2 for the analysis of Nanopore data.
<br/>

It can handle reads from direct RNAseq, cDNAseq, DNAseq etc.

<br/>


![MOP3](https://github.com/biocorecrg/master_of_pores/blob/v3.0/img/goku3.png?raw=true)

The name is inspired by the Metallica's [Master Of Puppets](https://www.youtube.com/watch?v=S7blkui3nQc)

## Install
Please install nextflow and singularity or docker before.

Then download the repo:

```
git clone --depth 1 --recurse-submodules [email protected]:biocorecrg/MOP2.git
```

or
```
git clone --depth 1 --recurse-submodules https://github.com/biocorecrg/MOP2.git
git clone --depth 1 --recurse-submodules https://github.com/biocorecrg/master_of_pores.git
```

You can use INSTALL.sh to download the version 3.4.5 of guppy or you can replace it with the version you prefer. Please consider that the support of VBZ compression of fast5 started with version 3.4.X.
You can use INSTALL.sh to download the version 3.4.5 of guppy or you can replace it with the version you prefer. Please consider that the support of VBZ compression of fast5 started with version 3.4.X.

```
cd MOP2; sh INSTALL.sh 3.4.5
cd master_of_pores; sh INSTALL.sh
```

## Testing
You can replace ```-with-singularity``` with ```-with-docker``` if you want to use the docker engine.

```
cd mop_preprocess
nextflow run mop_preprocess.nf -with-singularity -bg -profile local > log
nextflow run mop_preprocess.nf -with-singularity -bg -profile local -params-file params.yaml > log
```

## Upgrading
To upgrade the tool you can type:

```
git pull --recurse-submodules
```

## Documentation
The documentation is available at [https://biocorecrg.github.io/master_of_pores/](https://biocorecrg.github.io/master_of_pores/)

## Contact
Please open an [issue](https://github.com/biocorecrg/master_of_pores/issues) if you encounter any issues/troubles.
However, please go over the previous issues (including closed issues) before opening a new issue, as your same exact question might have been already answered previously. Thank you!


## Reference
If you use this tool, please cite our papers:
Expand All @@ -52,7 +72,3 @@ Cozzuto L, Delgado-Tejedor A, Hermoso Pulido T, Novoa EM, Ponomarenko J. *N. Met
["MasterOfPores: A Workflow for the Analysis of Oxford Nanopore Direct RNA Sequencing Datasets"
Luca Cozzuto, Huanle Liu, Leszek P. Pryszcz, Toni Hermoso Pulido, Anna Delgado-Tejedor, Julia Ponomarenko, Eva Maria Novoa.
*Front. Genet., 17 March 2020.* https://doi.org/10.3389/fgene.2020.00211](https://www.frontiersin.org/articles/10.3389/fgene.2020.00211/full)


## Documentation
The documentation is available at [https://biocorecrg.github.io/MOP2/docs/](https://biocorecrg.github.io/MOP2/docs/about.html)
Binary file added anno/curlcake_constructs.fasta.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added anno/yeast_rRNA_ref.gtf.gz
Binary file not shown.
183 changes: 183 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = u'Master of Pores 3'
copyright = u'2019, CRG'
author = u'Luca Cozzuto'
author = u'Anna Delgado'
author = u'Eva Novoa'

# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
release = u''


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.githubpages'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
#source_suffix = ['.rst', '.html']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'docs/index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_copy_source = False
html_show_sourcelink = False

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'SphinxGitHubActionTestdoc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'SphinxGitHubActionTest.tex', u'Sphinx GitHub Action Test Documentation',
u'Sean Zheng', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'sphinxgithubactiontest', u'Sphinx GitHub Action Test Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'SphinxGitHubActionTest', u'Sphinx GitHub Action Test Documentation',
author, 'SphinxGitHubActionTest', 'One line description of project.',
'Miscellaneous'),
]


# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']


# -- Extension configuration -------------------------------------------------
22 changes: 9 additions & 13 deletions conf/awsbatch.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ aws.region = 'eu-central-1'
aws.batch.cliPath = '/home/ec2-user/miniconda/bin/aws'

process {
shell = ['/bin/bash', '-euo', 'pipefail']
executor = 'awsbatch'
queue = 'mop'
cpus = 1
Expand All @@ -13,40 +14,35 @@ process {
containerOptions = { workflow.containerEngine == "docker" ? '-u $(id -u):$(id -g)': null}

withLabel: big_cpus {
cpus = 2
memory = '2G'
cpus = 8
memory = '12G'
}

withLabel: big_cpus_ignore {
errorStrategy = 'ignore'
cpus = 2
memory = '2G'
cpus = 8
memory = '12G'
}

withLabel: big_mem_cpus {
time = '6h'
cpus = 3
memory = '2G'
}

withLabel: big_time_cpus {
time = '24h'
cpus = 3
memory = '2G'
cpus = 8
memory = '20G'
}

withLabel: demulti_gpus {
accelerator = 1
queue = 'mop-gpu'
memory = '2G'
// clusterOptions = {" -l gpu=1 -l virtual_free=${task.memory.toString().replaceAll(/[\sB]/,'')}"}
containerOptions = { workflow.containerEngine == "singularity" ? '--nv':
( workflow.containerEngine == "docker" ? '-u $(id -u):$(id -g) --gpus all': null ) } }
withLabel: basecall_gpus {
accelerator = 1
queue = 'mop-gpu'
memory = '2G'
clusterOptions = '-l gpu=1'
containerOptions = { workflow.containerEngine == "singularity" ? '--nv':
containerOptions = { workflow.containerEngine == "singularity" ? '--nv':
( workflow.containerEngine == "docker" ? '-u $(id -u):$(id -g) --gpus all': null ) }
}
}
Loading

0 comments on commit c8b204a

Please sign in to comment.