Skip to content

Commit

Permalink
Merge pull request #10 from TRON-Bioinformatics/release_1.3.5
Browse files Browse the repository at this point in the history
Release 1.3.5
  • Loading branch information
ibn-salem authored Jun 20, 2022
2 parents 7709a4f + 95aaa7d commit e423587
Show file tree
Hide file tree
Showing 15 changed files with 149 additions and 11 deletions.
13 changes: 11 additions & 2 deletions Dockerfile → Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from ubuntu:20.04

RUN apt-get update -y --fix-missing
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y software-properties-common python python3 python3-pip emacs curl wget zip unzip tar zlib1g-dev liblzo2-dev libcurl4-openssl-dev libssl-dev libncurses5 tzdata
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y software-properties-common git python python3 python3-pip emacs curl wget zip unzip tar zlib1g-dev liblzo2-dev libcurl4-openssl-dev libssl-dev libncurses5 tzdata

RUN curl -O https://repo.anaconda.com/miniconda/Miniconda2-latest-Linux-x86_64.sh
RUN bash Miniconda2-latest-Linux-x86_64.sh -b -p /root/miniconda2
Expand Down Expand Up @@ -35,6 +35,15 @@ RUN R --slave -e 'remotes::install_version("tidyverse", "1.2.1")'
RUN R --slave -e 'remotes::install_version("XML", "3.99-0.9")'
RUN R --slave -e 'remotes::install_version("randomForest", "4.6-14")'


COPY ./code/ /code/

# After release 1.3.5 these lines can be used to automate docker image creation process further
#RUN wget https://github.com/TRON-Bioinformatics/EasyFuse/archive/refs/tags/v1.3.5.tar.gz && \
#tar xvfz v1.3.5.tar.gz && \
#mv EasyFuse-1.3.5/ /code/easyfuse/ && \
#cd /code/easyfuse/ && \
#mv config.ini.docker config.ini && \
#mv build_env.sh.sample build_env.sh && \
#mv blacklist.txt.sample blacklist.txt

ENV PERL5LIB "$PERL5LIB:/code/SOAPfuse/1.27/source/bin/perl_module/"
6 changes: 6 additions & 0 deletions Docker/build_docker_img_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

docker build \
--rm \
-t docker.io/tronbioinformatics/easyfuse:latest \
.
7 changes: 7 additions & 0 deletions Docker/run_docker_img_interactive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

docker run \
--name test_easyfuse_container \
-v /scratch/info/data/easyfuse/easyfuse_ref:/ref \
-it docker.io/tronbioinformatics/easyfuse:1.3.5 \
/bin/bash
9 changes: 9 additions & 0 deletions Docker/run_docker_img_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

docker run \
--name test_easyfuse_container \
-v /scratch/info/data/easyfuse/easyfuse_ref:/ref \
-v /scratch/info/data/easyfuse/easyfuse_data:/data \
--rm \
-it docker.io/tronbioinformatics/easyfuse:latest \
python /code/easyfuse/processing.py -i /data/input_fastqs -o /data/results/
10 changes: 10 additions & 0 deletions Docker/run_singularity_img_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash


singularity exec \
-W ./ \
--bind /scratch/info/data/easyfuse/easyfuse_ref:/ref \
--bind /scratch/info/data/easyfuse/easyfuse_data:/data \
docker://docker.io/tronbioinformatics/easyfuse:latest \
python /code/easyfuse/processing.py -i /data/input_fastqs -o /data/results/

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ We recommend using EasyFuse with the Docker container.
The Docker image can be downloaded from [dockerhub](https://hub.docker.com/r/tronbioinformatics/easyfuse) using the following command:

```
docker pull tronbioinformatics/easyfuse:1.3.4
docker pull tronbioinformatics/easyfuse:latest
```

### Download reference data
Expand Down Expand Up @@ -56,8 +56,8 @@ docker run \
-v </path/to/data>:/data \
-v </path/to/output>:/output \
--rm \
-it easyfuse:1.3.4 \
python /code/easyfuse-1.3.4/processing.py -i /data -o /output
-it easyfuse:latest \
python /code/easyfuse/processing.py -i /data -o /output
```


Expand All @@ -68,7 +68,7 @@ The output can be found in `</path/to/output>/results/`. The Output format is de
The EasyFuse pipeline depends on multiple external fusion prediction tools and other dependencies. For example:

- [STAR](https://github.com/alexdobin/STAR) (2.6.1d)
- [STAR-Fusion](https://github.com/STAR-Fusion/STAR-Fusion/wiki) (2.6.1d)
- [STAR-Fusion](https://github.com/STAR-Fusion/STAR-Fusion/wiki) (1.5.0)
- [Fusioncatcher](https://github.com/ndaniel/fusioncatcher)(1.00)
- [MapSplice2](https://github.com/davidroberson/MapSplice2) (2.2.1)
- [InFusion](https://bitbucket.org/kokonech/infusion/src/master/) (0.8)
Expand Down
88 changes: 88 additions & 0 deletions config.ini.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Required user input:
# 1) Which fusion prediction tools should be executed (tools)
# 2) Which post-processing steps should be executed (fd_tools)
# 3) Which reference data shall be used (ref_trans_version & ref_genome_build)
# 4) To whom shall slurm mails be sent to (receiver)

[general]
version = 1.3.5
pipeline_name = EasyFuse
tools = QC,Readfilter,Fusioncatcher,Star,Starfusion,Infusion,Mapsplice,Soapfuse,Fetchdata,Summary
fusiontools = Fusioncatcher,Starfusion,Infusion,Mapsplice,Soapfuse
fd_tools = Fusiongrep,Contextseq,Starindex,ReadFilter2,ReadFilter2b,StaralignBest,BamindexBest,RequantifyBest
sender = [email protected]
receiver = [email protected]
min_read_len_perc = 0.75
max_dist_proper_pair = 200000
cis_near_distance = 1000000
model_pred_threshold = 0.5
tsl_filter = 4,5,NA
requant_mode = best
context_seq_len = 400
ref_genome_build = hg38
ref_trans_version = ensembl
queueing_system = none
time_limit = 30-00:00:0
partition = Compute
user = sorn
module_dir = /code/easyfuse/

# Define ressource usage (cpu (number of threads), mem (ram in Gb)):
[resources]
qc = 6,10
readfilter = 6,50
star = 6,40
mapsplice = 6,30
fusioncatcher = 6,30
starchip = 12,30
starfusion = 6,30
infusion = 6,30
soapfuse = 6,20
classification = 1,16
fetchdata = 12,50
summary = 1,16


# execution command for individual programs (what you write here should be identical to what is typed in the console)
[commands]
# for qc
fastqc = fastqc
skewer = /code/skewer-0.2.2/skewer
# for processing
mapsplice = mapsplice.py
fusioncatcher = /code/fusioncatcher/1.0/bin/fusioncatcher
starfusion = STAR-Fusion
infusion = /code/InFusion-0.8/infusion
soapfuse = /code/SOAPfuse/1.27/SOAPfuse-RUN.pl
# for processing and fetch data
star = STAR
samtools = samtools
# for liftover
crossmap = test


# full path to reference files
[references]
genome_fasta = /ref/Homo_sapiens.GRCh38.dna.primary_assembly.fa
genome_fastadir = /ref/fasta
genome_sizes = /ref/STAR_idx/chrNameLength.txt
genes_fasta = /ref/Homo_sapiens.GRCh38.cdna.all.fa
genes_gtf = /ref/Homo_sapiens.GRCh38.86.gtf
genes_adb = /ref/Homo_sapiens.GRCh38.86.gff3.db
genes_tsl = /ref/Homo_sapiens.GRCh38.86.gtf.tsl



# full path to program indices
[indices]
star = /ref/star_index/
bowtie = /ref/bowtie_index/hg38
starfusion = /ref/starfusion_index/
fusioncatcher = /ref/fusioncatcher_index/


# full path to program specific config files (these are just general files which need no user modification)
[other_files]
infusion_cfg = /ref/infusion.cfg
soapfuse_cfg = /ref/soapfuse.cfg
easyfuse_model = /code/easyfuse/data/model/Fusion_modeling_FFPE_train_v33.random_forest.model_full_data.EF_full.rds
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion fetchdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def __init__(self, scratch_path, fetchdata_path, sample_id, cfg_file):
if cfg_file.endswith("ini"):
self.cfg = ConfigParser()
self.cfg.read(cfg_file)
print(self.cfg)
elif cfg_file.endswith("json"):
with open(cfg_file) as config_file:
self.cfg = json.load(config_file)
Expand Down
6 changes: 3 additions & 3 deletions fusiontoolparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,8 @@ def lookup_fusions_in_prediction(self, dict_of_fusion_dicts):
# eg: fusion with gene1 "AB1" and gene2 "AB2" will match to fusion "AB11"-"AB22"
#if uniq_fusion_id_split[0] in fusion_id_split and uniq_fusion_id_split[2] in fusion_id_split:
# urla: possible solution:
print(fusion_id_split)
print(uniq_fusion_id_split)
#print(fusion_id_split)
#print(uniq_fusion_id_split)
if ((uniq_fusion_id_split[0] == fusion_id_split[0] and uniq_fusion_id_split[1] == fusion_id_split[1]) or
(uniq_fusion_id_split[0] == fusion_id_split[1] and uniq_fusion_id_split[1] == fusion_id_split[0])):
found_fusion = True
Expand Down Expand Up @@ -601,7 +601,7 @@ def run(self):
self.logger.debug("Generating Detected Fusions table")

fusion_result_dict, results_with_errors_dict = self.concatenate_fusion_results(tool_state_path, self.fusion_output_path)
print(len(fusion_result_dict))
#print(len(fusion_result_dict))
if sum(results_with_errors_dict.values()) == len(fusion_result_dict):
self.logger.error("Fusion parsing failed completely. Revision required. Aborting.")
sys.exit(1)
Expand Down
2 changes: 1 addition & 1 deletion getRequantReads.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self, bam, output, context_file):

self.coord_dict = {}
self.get_ranges(context_file)
print(self.coord_dict)
#print(self.coord_dict)

def get_ranges(self, context_file):
""" vlkfh """
Expand Down
10 changes: 10 additions & 0 deletions run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

rm -rf test_out_ini

python processing.py \
-i test_case/SRR1659960_05pc_R1.fastq.gz \
test_case/SRR1659960_05pc_R2.fastq.gz \
-o test_out_ini/ \
-c config.ini \
-p 30448

0 comments on commit e423587

Please sign in to comment.