Skip to content
Snippets Groups Projects
README.rst 9.91 KiB
Newer Older
.. image::      docs/source/_images/frangiPANe.png


FrangiPANe
    a tool designed to simplify the construction of a pan-reference using the map-then-assembly approach.
Previously developed as a modular and interactive application based on Jupyter Book [1]_ , it has now been recoded and integrated into a Snakemake pipeline.
#################
1.1 - Install the frangiPANe python package
=================
Requirement
-----------------
- `Git <https://git-scm.com/>`_

- `Singularity <https://...>`_
Clone the git repository
-----------------

* Caution, still in development mode... but installation will be more straightforward soon.
   git clone https://forge.ird.fr/diade/frangipane.git
::

    cd PATH_2_FRANGIPANE_DIRECTORY
    python3 -m pip install -U pip setuptools build
    python3 -m pip install snakecdysis@git+https://forge.ird.fr/phim/sravel/snakecdysis.git@main
    python3 -m pip install .
1.2 Install frangiPANe tool
=================

-----------------
    module load <SINGULARITY_NAME>
    module load <PYTHON_VERSION>

    frangiPANe install_cluster -s slurm -e singularity

Add the prompt complementation
-----------------

::

    sh path2frangipane_directory/frangiPANe/frangiPANe-complete.sh


Download or build the singularity container in the container directory
-----------------
    cd path2frangipane_directory/frangiPANe/frangiPANe/containers/

    # Download the container
    wget https://itrop.ird.fr/frangiPANe/frangiPANe.sif
Checking if frangiPANe has been correctly installed
-----------------
*  You can run the following command :

::

    frangiPANe  command

If everything is okay, the following lines should be printed.

::





       ad88                                                    88  88888888ba      db         888b      88
      d8'                                                      ''  88      "8b    d88b        8888b     88
      88                                                           88      ,8P   d8'`8b       88 `8b    88
    MM88MMM  8b,dPPYba,  ,adPPYYba,  8b,dPPYba,    ,adPPYb,d8  88  88aaaaaa8P'  d8'  `8b      88  `8b   88   ,adPPYba,
      88     88P'   "Y8  ''     `Y8  88P'   `"8a  a8"    `Y88  88  88'''''''   d8YaaaaY8b     88   `8b  88  a8P_____88
      88     88          ,adPPPPP88  88       88  8b       88  88  88         d8''''''''8b    88    `8b 88  8PP''''''
      88     88          88,    ,88  88       88  "8a,   ,d88  88  88        d8'        `8b   88     `8888  '8b,   ,aa
      88     88          `'8bbdP'Y8  88       88   `'YbbdP'Y8  88  88       d8'          `8b  88      `888   `'Ybbd8''
                                                   aa,    ,88
                                                    'Y8bbdP'

    A modular and interactive application to simplify  the construction of a panreference  using the map-then-assembly approach."

        Version Version 1.0

        @author: Sebastien Ravel and Christine Tranchant
        @email: christine.tranchant@ird.fr

        Please cite our github: https://forge.ird.fr/diade/frangipane

        Licencied under CeCill-C (http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html)
        and GPLv3 Intellectual property belongs to IRD, CIRAD and authors.

        Documentation avail at: https://frangiPANe.readthedocs.io/en/latest/


        ** NOTE: This frangiPANe version (Version 1.0) is higher than the production version (There aren’t any releases), you are using a dev version


    Usage: frangiPANe [OPTIONS] COMMAND [ARGS]...

    Options:
      -r, --restore      Restore previous installation to use again "install_local" or "install_cluster"  [default: False]
      -e, --install_env  print Install path, Tools config, Install mode, Tools install mode, Current version, Latest version avail, Snakecdysis version
                         [default: False]
      -v, --version      Show the version and exit.
      -h, --help         Show this message and exit.

    Commands:
      create_config        Create config.yaml for run
      edit_cluster_config  Edit cluster_config.yaml use by profile
      edit_tools           Edit own tools version
      run_cluster          Run workflow on HPC
      show_tools           show tools version
      test_install         Test frangiPANe cluster mode with "data_test"


* To check the path of the container and modify the name of modules if necessary in cluster mode, run the following command:

::

    frangiPANe edit_tools

This command should display information about the container path and allow you to make modifications to the module names if needed.
      1 ## BUILD SINGULARITY IMAGES PATH
      2 ## PLEASE FILL IN SINGULARITY IMAGES PATH IF YOU HAVE CHOSEN INSTALL WITH ENV MODE SINGULARITY (option --env singularity)
      3 ## PLEASE FILL IN "ENVMODULES" SECTION IF YOU HAVE CHOSEN INSTALL WITH ENV MODE MODULES (option --env modules)
      4 ## WARNING!!! DO NOT ERASE LINES OR COMMENT THEM !  è_é
      5
      6 SINGULARITY:
      7
      8     TOOLS : '/scratch/tranchant/frangipane/frangiPANe/containers/frangiPANe.sif'
      9
     10 # Is and exemple of tools path
     11 ENVMODULE:
     12     ABYSS : "abyss"
     13     BWA : "bwa"
     14     EA-UTILS : "ea-utils"
     15     SAMTOOLS : "samtools"
     16     ASSEMBLY-STATS : "assembly-stats"
     17     CD-HIT : "cdhit"
     18     FASTQ_STATS: "fastq_stats"
     19     FASTQ_STATS: "fastq_stats"
     20     NCBI-TOOLS: "ncbi-tools++"
    frangipane
    ├── docs
    │   ├── build
    │   ├── requirements.txt
    │   └── source
    ├── frangiPANe
    │   ├── containers
    │   │   ├── frangiPANe.def
    │   │   └── frangiPANe.sif
    │   ├── default_profile
    │   │   ├── cluster_config.yaml
    │   │   ├── config.yaml
    │   │   └── ...
    │   ├── frangiPANe-complete.sh
    │   ├── install_files
    │   │   ├── cluster_config_SLURM.yaml
    │   │   ├── config.yaml
    │   │   └── tools_path.yaml
    │   ├── main.py
    │   ├── module.py
    │   ├── report
    │   ├── schemas
    │   ├── snakefiles
    │   ├── snakemake_scripts
    │   │   ├── frangiPANe.py
    │   │   ├── generate_jb_frangiPANe.py
    │   │   ├── generate_jb.py
    │   │   └── __init__.py
    │   └── VERSION
    ├── LICENSE
    ├── pyproject.toml
    └── README.rst

II - Downloading a dataset to test frangiPANe
#################


::

   frangiPANe test_install -d path_to_directory_that_contains_data


III - Run FrangiPANe
#################

**local mode**

::

    frangiPANe -e
    frangiPANe run_local -c frangiPANe/install_files/config.yaml --threads 2

**cluster mode**

* To configure Slurm jobs, you can run the following command :

::

    frangiPANe edit_cluster_config

This command is likely to open a configuration file in a text editor, allowing you to specify the necessary parameters for configuring Slurm jobs. Make the required modifications, save the file, and exit the text editor.

      1 __default__:
      2     cpus-per-task: 1
      3     mem-per-cpu: 6G
      4     partition: normal
      5     nodelist: node1
      6     output: '{log.output}_cluster'
      7     error: '{log.error}_cluster'
      8     job-name: '{rule}.{wildcards}'
      9
     10 abyss:
     11     cpus-per-task: 3
     12
     13 bwa_mem:
     14     cpus-per-task: 4
     15
     16 samtools_view:
     17     cpus-per-task: 3
     18
     19 samtools_flagstat:
     20     cpus-per-task: 3
     21
     22 #vecscreen
     23
     24 #create_panref

* To launch your first analysis with frangiPANe using the data-test dataset :
    module load python/3.8.12
    frangiPANe run_cluster -c /scratch/tranchant/data_test_config.RN.yaml --cluster-config /scratch/tranchant/frangipane/frangiPANe/install_files/cluster_config_ITROP.yaml
::

    #!/bin/bash

    #SBATCH -J frangiPANe
    #SBATCH -o frangiPANe."%j".out
    #SBATCH -e frangiPANe."%j".err

    #SBATCH --mail-user christine.tranchant@ird.fr
    #SBATCH --mail-type=ALL

    #SBATCH -p normal
    #SBATCH -w node1
    #SBATCH -c 1 # number of nodes

    module load python/3.8.12
    module load singularity/4.0.1
    frangiPANe run_cluster -c /scratch/tranchant/data_test_config.RN.yaml
** example input**


#################
    tranchant@node1 tranchant]$ tree rice-output/
    rice-output/
    ├── 01-fastq
    │   ├── 01_mapped
    │   │   ├── panref
    │   │   └── ref
    │   └── 02-filtered
    │       └── ref
    ├── 02-assembly
    │   ├── 01-abyss
    │   ├── 02-filtered
    │   ├── 03-vecscreen
    │   └── 04-samples-merged
    ├── 03-clustering
    │   ├── 01-cd-hit
    │   └── 02-panreference
    ├── 04-stats
    │   ├── 01-fastq
    │   ├── 04-plots
    │   └── 04-summary
    ├── LOGS
    └── report

#################
* For version 2.0: *Sebastien Ravel and Christine Tranchant-Dubreuil (2024).*
* For version 0.1: *Christine Tranchant-Dubreuil and al. (2023). FrangiPANe, a tool for creating a panreference using left behind reads. NAR Genom Bioinform. doi: 10.1093/nargab/lqad013.*
#################

-  Licencied under CeCill-C
   (http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html) and
   GPLv3

-  Intellectual property belongs to IRD/UMR DIADE.

-  Copyright 2024
#################

.. [1] Christine Tranchant-Dubreuil and al. (2023). FrangiPANe, a tool for creating a panreference using left behind reads. NAR Genom Bioinform. doi: 10.1093/nargab/lqad013..