Skip to content

Commit eb54372

Browse files
committed
updated tagada
1 parent c1748ea commit eb54372

File tree

6 files changed

+123
-0
lines changed

6 files changed

+123
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Copyright 2018-2025 Hugo López-Fernández, Pedro M. Ferreira, Miguel
3+
# Reboiro-Jato, Cristina P. Vieira, and Jorge Vieira
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
FROM pegi3s/docker:29.0.1
19+
20+
# Install dependencies (Java for Nextflow, curl to download)
21+
RUN apt-get update && apt-get install -y --no-install-recommends \
22+
openjdk-17-jdk \
23+
ca-certificates \
24+
curl \
25+
&& rm -rf /var/lib/apt/lists/*
26+
27+
# Install Nextflow
28+
RUN curl -fsSL https://get.nextflow.io | bash && \
29+
mv nextflow /usr/local/bin/
30+
31+
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
32+
33+
RUN chmod +x /usr/local/bin/entrypoint.sh
34+
35+
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
36+
37+
CMD ["bash"]
File renamed without changes.

tagada/2.1.4/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This image belongs to a larger project called Bioinformatics Docker Images Project (http://pegi3s.github.io/dockerfiles)
2+
## (Please note that the original software licenses still apply)
3+
4+
This image facilitates the usage of [Tagada](https://github.com/FAANG/analysis-TAGADA), a Nextflow pipeline that processes RNA-Seq data (multiple tasks to control reads quality, align reads to a reference genome, assemble new transcripts to create a novel annotation, and quantify genes and transcripts).
5+
6+
# Using the tagada image in Linux
7+
You should adapt and run the following command:
8+
`docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v "$(pwd)":"$(pwd)" -w "$(pwd)" nextflow-runner-auto:latest nextflow run FAANG/analysis-TAGADA -profile docker -revision 2.1.4 --output results --reads reads.txt --annotation genomic_filtered.gtf --genome genome.fa -params-file custom.config.json --metadata metadata.tsv`
9+
10+
In this command, you should replace:
11+
12+
- `reads.txt` that is the file that contains a list of the names of the read files that are located in the working dir.
13+
- `genomic_filtered.gtf` to the name of the GTF file (see notes below).
14+
- `genome.fa` that is the genome sequence file in FASTA format.
15+
- `custom.config.json` that is the configuration file (see notes below).
16+
- `metadata.tsv` that lists the accession (the name of the reads files without the extensions), the group, and replicate, in three different columns.
17+
18+
In Windows WSL it must be run in a Linux partition The `.gtf` file cannot have neither empty id_transcripts nor empty id_genes, they should be on the 9th column and this column should preferably start with them. Use GTF (GTF2.2) that is compatible with the GFF2. On the 7th column the "?" cannot be pressent. Needs Genome (.fa) and RNASeq (.fq). Most of the optional information (after the "--") needs to be on the custom.config.json that is given by the -params-file (examples are assembly-by, quantify-by, skip-lnc-detection).
19+
20+
An example of a `custom.config.json` could be:
21+
22+
```json
23+
{
24+
"assemble-by": "group",
25+
"quantify-by": "group,replicate"
26+
}
27+
```
28+
29+
An example of a metadata.tsv file could be:
30+
31+
| accession | group | replicate |
32+
|-------------|-------|-----------|
33+
| SRR32701035 | 1 | 1 |
34+
| SRR32701036 | 1 | 2 |
35+
36+
To clean the unecessary data after running this iamge (work + assets), use: `docker run --rm -v "$(pwd)":"$(pwd)" -w "$(pwd)" nextflow-runner-auto:latest cleanAll`

tagada/2.1.4/entrypoint.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
# entrypoint.sh - Executes commands or performs cleanup based on input
3+
set -e
4+
5+
export NXF_HOME=$(pwd)/.nf_config_cache
6+
7+
echo "--- Nextflow Runner Entrypoint ---"
8+
echo "Working Directory : $(pwd)"
9+
echo "NXF_HOME set to : ${NXF_HOME}"
10+
echo "Running command : $@"
11+
echo "------------------------------"
12+
13+
# Check if the first argument passed to the container is "cleanAll"
14+
if [ "$1" == "cleanAll" ]; then
15+
echo "*** CleanAll command received ***"
16+
17+
echo "Attempting to remove Work directory: ${WORK_DIR}"
18+
# Check if directory exists before trying to remove
19+
if [ -d "$(pwd)/work" ]; then
20+
rm -rf "$(pwd)/work"
21+
echo "Work directory removed."
22+
else
23+
echo "Work directory ($(pwd)/work) not found, skipping."
24+
fi
25+
26+
echo "Attempting to remove Nextflow config/asset directory: ${NXF_HOME}"
27+
# Check if directory exists before trying to remove
28+
if [ -d "${NXF_HOME}" ]; then
29+
rm -rf "${NXF_HOME}"
30+
echo "NXF_HOME directory removed."
31+
else
32+
echo "NXF_HOME directory (${NXF_HOME}) not found, skipping."
33+
fi
34+
35+
echo "Cleanup complete."
36+
exit 0 # Exit successfully after cleaning
37+
38+
else
39+
40+
# Run the main command and Store the exit status
41+
"$@"
42+
EXIT_STATUS=$?
43+
echo "------------------------------"
44+
echo "Main command finished with status: ${EXIT_STATUS}"
45+
46+
fi
47+
48+
# Exit the entrypoint script with the original exit status of the main command
49+
exit ${EXIT_STATUS}
50+

0 commit comments

Comments
 (0)