Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
266 commits
Select commit Hold shift + click to select a range
a2241a1
Validating and Saving background file if uploaded from Pepscanner
prmunday Aug 8, 2024
9e713f8
Background file name fix
prmunday Aug 11, 2024
ff83bfa
Removing Not required file
prmunday Aug 14, 2024
4a965c8
Error dispay if fasta file cannot be processed by the server
prmunday Aug 14, 2024
86e4cd7
Server to use uploaded backfround fasta file if uploaded
prmunday Aug 14, 2024
01595e0
If protien mapping does not exist locally. Fetching from uniprot.
prmunday Aug 14, 2024
95ff92d
Added Murine mapping in the local protien to gene mapping file
prmunday Aug 14, 2024
fcfe7fc
Bug fix : default human proteome reference
prmunday Aug 14, 2024
1d7300d
Pepscanner description updated
prmunday Aug 14, 2024
bc4c6f9
pip3 library update to include requests and Bio
prmunday Aug 15, 2024
7f88ce6
length distribution toggle button update
prmunday Aug 15, 2024
35d3c8b
Added limit on number of samples and number of peptides
prmunday Aug 19, 2024
a67b93f
Adding limit on number of alleles selected by the user
prmunday Aug 19, 2024
6a78690
Updating input peptide and allele limits
prmunday Aug 20, 2024
5dbc6c7
allele limit message update
prmunday Aug 20, 2024
13d0cfc
Performance improvment and bug fix for peptide count at client side
prmunday Aug 22, 2024
e66a79e
Backend upadte to lmit the peptides uploaded
prmunday Aug 27, 2024
3738a68
Bug fix: traceback display
prmunday Aug 27, 2024
541c671
Updated limit of number of alleles
prmunday Sep 6, 2024
e61540d
Allowing users to upload file with . in the name
prmunday Sep 16, 2024
36d212d
Updating peptide limit to 200k
prmunday Sep 23, 2024
041fc38
temporary incresing the peptide limit
prmunday Sep 26, 2024
4b0c6ec
Hide motifs and gibbs when no class 2 alleles selected
prmunday Oct 25, 2024
ee8d7e2
hide motifs and gibbs for classs 2 when no alleles selected
prmunday Oct 30, 2024
e4b7adc
Increment the sample limit
prmunday Nov 7, 2024
e38f26e
Api validation when no sample uploaded
prmunday Oct 24, 2024
14348e2
added mhc flurry in pip requirements
prmunday Oct 31, 2024
a1511bd
Added file to strore constants
prmunday Oct 31, 2024
03dc255
File to unit test methods
prmunday Oct 31, 2024
3a21d97
Binders prediction using MHCflurry
prmunday Oct 31, 2024
d9c46e4
direcrtory clean up
prmunday Oct 31, 2024
942590f
Input tool name fix
prmunday Nov 5, 2024
a6759e1
Running tools allele by allele
prmunday Nov 12, 2024
4dead59
Configured binder saving files to include flurry
prmunday Nov 12, 2024
71649e9
Using affinity (nM) for Flurry instead of PS
prmunday Nov 14, 2024
17ca35c
Front end updates for MixMHCpred 3.0
prmunday Nov 14, 2024
40fe534
pip3 update
prmunday Nov 14, 2024
6f27c3e
Configure netMHC2pan to run
prmunday Nov 14, 2024
b5da745
MixMHC2pred bug to fetch binders
prmunday Nov 14, 2024
56fb5ab
Added allele dictionary for version 2
prmunday Nov 19, 2024
e49671d
Upate allele dictionary
prmunday Nov 19, 2024
67d66db
Update initialiser module to use alleles from allele dictionary
prmunday Nov 19, 2024
af1da4e
Fixed entries for H-2 MixMHCpred
prmunday Nov 19, 2024
6b5d04d
Back end update to run prediction using allele dict (except netmhcpan)
prmunday Nov 19, 2024
fe87a56
Run predictor based on allele dict and optimised netMHCpan execution …
prmunday Nov 22, 2024
5d2dc1f
Run netmhc2pan to output xls output and save binder data for netmhc2pan
prmunday Nov 22, 2024
65705c7
Overlap plot to not show conrol if not uploaded. Fixed upload csv hel…
prmunday Nov 24, 2024
8c3f04a
Typo fix
prmunday Nov 24, 2024
4f145a3
Usage of allele compatibility matrix
prmunday Nov 26, 2024
9f98630
Bug fix: show table with predictin results
prmunday Nov 26, 2024
6d9263b
Add message to indicate the existing job cannot be accessed
prmunday Nov 26, 2024
a414f61
Merge branch 'develop' into feature/netMHCIIpan-integration
prmunday Nov 26, 2024
b5526c7
Remove local files
prmunday Nov 26, 2024
2b71b9f
Merge branch 'develop' of https://github.com/prmunday/Immunolyser int…
prmunday Nov 26, 2024
4946741
Remove not required line
prmunday Nov 26, 2024
b51bc6a
Merge branch 'feature/netMHCIIpan-integration' into develop
prmunday Nov 26, 2024
08cbac2
Show error message on screen than exception
prmunday Nov 26, 2024
8d47207
version name update
prmunday Nov 26, 2024
424b737
Use netmhc2pan results for seqlogo and gibbs
prmunday Nov 27, 2024
558c3bf
fixed allele name sorting and mhc class symbol
prmunday Nov 27, 2024
9f35843
Automatic selection of human class I on load of initialiser
prmunday Nov 27, 2024
a8ab322
Added allele search box and fixed h2 allele names for mixmhc2pred
prmunday Nov 27, 2024
06ff076
bug fix: do not print file coded conent in logs
prmunday Nov 27, 2024
da67028
use logger instead of print
prmunday Nov 27, 2024
a943b06
Enabling user to select motif lenght for class I
prmunday Nov 27, 2024
fad4b31
Pepscanner fix : replace quotes if present in column names
prmunday Dec 2, 2024
30121bd
Pepscaner : Sort proteins by peptide count
prmunday Dec 2, 2024
92ad7ad
Update species name
prmunday Jan 16, 2025
e41d812
Update h2 allele names
prmunday Jan 23, 2025
ba85620
py script to fix depenencies issue
prmunday Jan 23, 2025
efcc873
Initial docker file setup
prmunday Jan 23, 2025
35d7573
clean up
prmunday Jan 23, 2025
0567410
Merge branch 'develop' of https://github.com/prmunday/Immunolyser int…
prmunday Jan 23, 2025
ccf8b99
main gibbs setting update
prmunday Jan 29, 2025
ba443f5
gibbs bug fix and reverse last change
prmunday Jan 29, 2025
685c59e
bug fix
prmunday Jan 29, 2025
7ea4ef2
gubbs update
prmunday Jan 29, 2025
f0f028a
updated gibss running when ran individually
prmunday Jan 29, 2025
4661642
bug fix from last commit
prmunday Jan 29, 2025
3f7ee6d
gibbs py reverse
prmunday Feb 4, 2025
29ba2f7
dynamic set CELERY_BROKER_URL based on env
prmunday Jan 24, 2025
d6287b6
docker git repo update : temp
prmunday Jan 24, 2025
47952d2
Initial set up to run celery in docker
prmunday Jan 24, 2025
8562377
docker mount fix
prmunday Jan 24, 2025
4b146d9
adding python 2 in repo
prmunday Jan 25, 2025
759825b
remove python2 and type might not be copmatible
prmunday Jan 25, 2025
f9d2bb6
seq2logo gs fix
prmunday Jan 25, 2025
c8e0c65
updated docker file to load data files into host folder
prmunday Jan 29, 2025
817201c
updated gibbs cluster script to use project root to determine seq2log…
prmunday Jan 31, 2025
75c6f89
added logging in utils method
prmunday Jan 31, 2025
fbbf5b1
pass logger in utls method
prmunday Jan 31, 2025
4a30297
util method update
prmunday Jan 31, 2025
1325249
testing docker file update
prmunday Jan 31, 2025
3f6fed1
added option to check no prefix is created
prmunday Feb 2, 2025
d3509b4
reverse last change
prmunday Feb 2, 2025
aea3a02
pushing latest yml file
prmunday Feb 2, 2025
3a597c6
uodate docker file to install binder tools
prmunday Feb 3, 2025
f8beea4
man command for netmhcpab
prmunday Feb 3, 2025
6866601
use full path for the predictors
prmunday Feb 4, 2025
75f5705
path updates to use full path
prmunday Feb 4, 2025
47629e9
docker file fixes to run binders
prmunday Feb 4, 2025
2e3b194
netmhcpan path update
prmunday Feb 4, 2025
7e9cfd1
mkdir tmp for netmhc pan
prmunday Feb 4, 2025
ff4d8b4
docker file update
prmunday Feb 4, 2025
8404865
Input file exmaple update
prmunday Feb 9, 2025
d222c8c
Use presentation_percentile for MHCflurry
prmunday Feb 12, 2025
e9e3d87
Update celery status from Pending to Progressing
prmunday Feb 12, 2025
6edaf2d
update Progressing to Processing
prmunday Feb 12, 2025
5f27164
update gibbs class 1 and 2 args.. feed all mers for gibbs
prmunday Feb 20, 2025
c57d64e
remove function to generate gibbs cluster by click
prmunday Feb 20, 2025
488c4e8
Report text updated based on updated gibbs updated logic.
prmunday Feb 25, 2025
91bafee
Creation of folders to store majority voted binders
prmunday Feb 25, 2025
4b3b1a3
Revert seqlgog message about input peptides
prmunday Feb 27, 2025
ad76a57
Run Seq2Logo conditionally
prmunday Feb 27, 2025
35d5852
Conditionally running Seq2logo
prmunday Feb 27, 2025
0a34086
Analytics text update
prmunday Feb 27, 2025
95068dd
Hide Seq2Logo for class2 if no alleles are selected
prmunday Feb 27, 2025
75633d0
method not ready
prmunday Feb 28, 2025
9fe3137
bug fix for Gibbs motif length
prmunday Feb 28, 2025
f695abe
gibbs fix for docker
prmunday Feb 28, 2025
73a21b9
Clearn pepscnaner input files based on Accession column
prmunday Mar 1, 2025
eb95fb8
Functionality to majority voted binder as csv files
prmunday Mar 2, 2025
42c29f6
Generation of majority voted binder
prmunday Mar 2, 2025
93dc71d
Merge branch 'upgrade/download-majority-voted-binders' into develop
prmunday Mar 2, 2025
e128a06
Bug fix
prmunday Mar 2, 2025
d78bbfe
Bug fix
prmunday Mar 2, 2025
70e5ce4
Run HLA-clust
prmunday Mar 5, 2025
cb37377
Show HLA clust resutls in front end
prmunday Mar 5, 2025
d233767
Update hla-clust
prmunday Mar 6, 2025
b2e91c8
Upated code to run hla clust
prmunday Mar 12, 2025
8c3d9bf
Gibbs update to cluster 1-6
prmunday Mar 13, 2025
e797db2
Fix to run HLAClust
prmunday Mar 13, 2025
cd5bcb0
Update Dockerfile
prmunday Mar 19, 2025
81e42c9
run MHC tp without n_clusters arg
prmunday Apr 4, 2025
30122fa
description of MHC-TP
prmunday Apr 4, 2025
452c1ca
Update gibbs output with MHC-TP output
prmunday Apr 21, 2025
85796f6
Integrate MHC-TP results into GibbCluster results
prmunday Apr 24, 2025
013216f
temporary progress to remote
prmunday Apr 28, 2025
54cae88
Run protpetigram from the form submission, pending UI
prmunday Apr 30, 2025
70950f4
updated demo page for pepscanner
prmunday Apr 30, 2025
77e6ec3
pepscanner update pending bug of accession selectioin
prmunday Apr 30, 2025
aea14e9
Final integration ProtPeptigram
prmunday May 2, 2025
f82ae05
added protpeptigram in pip list
prmunday May 2, 2025
ef0e72b
Run protpeptigram one by one
prmunday May 2, 2025
f999c23
pepsacnner metadata table css adjust
prmunday May 3, 2025
5796a0d
Option to export data used to generate graphs
prmunday May 3, 2025
351592f
rearrange pepscanner
prmunday May 13, 2025
319ce83
pepsanner update
prmunday May 15, 2025
e008046
added email functionality
prmunday May 18, 2025
f58829f
updated text
prmunday May 26, 2025
51f870b
UI update
prmunday May 27, 2025
0cd3715
initialiser page ui update
prmunday May 28, 2025
a9cf42b
add job resitry
prmunday Jun 2, 2025
b77427b
Ability to download peptides from overlap
prmunday Jun 5, 2025
2580f09
update text ui
prmunday Jun 5, 2025
ef62591
Create README.md
prmunday Jun 8, 2025
e9abf4a
test readme update
prmunday Jun 8, 2025
bb96d19
generate gibbs update. test on remote server
prmunday Jun 12, 2025
35ca763
slick css update
prmunday Jun 12, 2025
54f583d
fix xhr of setupPeptideOverlapUpsetPlot
prmunday Jun 12, 2025
18592ee
bug fix js
prmunday Jun 12, 2025
c4cb0c7
bug fix js
prmunday Jun 12, 2025
cd82261
remote debuggin
prmunday Jun 12, 2025
f833c6d
remote debug js
prmunday Jun 12, 2025
4db13c6
remote debug js
prmunday Jun 12, 2025
ecbb04d
remote js debug
prmunday Jun 12, 2025
5097810
slcik update
prmunday Jun 12, 2025
4fb70fb
slcick upadte
prmunday Jun 12, 2025
adac42f
test slcik
prmunday Jun 12, 2025
464a5d3
Binding motif click on upset
prmunday Jun 15, 2025
7d1d2ab
UI update
prmunday Jun 19, 2025
2008a98
UI update. feedback from Natham
prmunday Jun 24, 2025
347f350
ui update
prmunday Jun 24, 2025
8c90ed1
ability to download seq2logo input peptides
prmunday Jun 25, 2025
bb0f8c0
seq2logo peptide download fix and completed
prmunday Jun 26, 2025
bdb34c7
enabling core download method for giibs
prmunday Jun 26, 2025
7b87836
Protpeptigram update
prmunday Jun 26, 2025
c46ce1e
protpeptigram fix
prmunday Jun 26, 2025
4beb947
MHC-TP ui update
prmunday Jul 1, 2025
03ec8cd
ui fix
prmunday Jul 1, 2025
8beb7c9
ui fix
prmunday Jul 1, 2025
4850fee
ui fix
prmunday Jul 1, 2025
bc80f5e
ui
prmunday Jul 1, 2025
4060218
revert gibb scroll bar ui update
prmunday Jul 2, 2025
470d3d5
pepscanner fix
prmunday Jul 8, 2025
c37a6c8
fix pepscanner image
prmunday Jul 10, 2025
af4342e
Update README.md
prmunday Jul 11, 2025
c9ac734
add traceback to hadnle no peptides after contan clean opetation
prmunday Jul 16, 2025
d1b52d2
fix exception handling
prmunday Jul 16, 2025
406dc55
hiding help page until updated
prmunday Jul 30, 2025
b2ac25f
Overlap plot selection option
prmunday Aug 21, 2025
608822e
update text
prmunday Aug 21, 2025
445b300
binding prediction adjust and issue fix
prmunday Aug 25, 2025
5ddb583
remove extra space
prmunday Aug 25, 2025
0a77a6e
Option to search a smaller database for mhc-tp
prmunday Sep 9, 2025
07cc37b
have all peptide in binding results
prmunday Sep 16, 2025
188a475
hla arg fix for mhc-tp
prmunday Sep 16, 2025
e71d4c4
update utils to run mhc-tp and update top 40 allele file per hla type
prmunday Sep 18, 2025
517d2e5
update to config netmhcpan 4.2
prmunday Sep 18, 2025
2cef177
updates for netmhcpan integration
prmunday Sep 20, 2025
eb70afd
change
prmunday Sep 20, 2025
21ed339
initaliser page udpates
prmunday Sep 21, 2025
3739e0f
added logs
prmunday Sep 21, 2025
f683388
pepscanner message update
prmunday Sep 21, 2025
f1281b5
tyring out upset update for violin plot
prmunday Sep 21, 2025
037ee4c
violine plot wokring
prmunday Sep 22, 2025
6e823b7
identation
prmunday Sep 22, 2025
4594e8c
single sample name post fix
prmunday Sep 23, 2025
e9b510b
finalise violin plot
prmunday Sep 23, 2025
357e423
ignore local setup files
prmunday Sep 24, 2025
715e220
sample validation message update
prmunday Sep 24, 2025
c2a99f3
download core as text
prmunday Sep 25, 2025
8b78902
MHC-TP description update
prmunday Sep 25, 2025
7d39757
update majorityvoting
prmunday Sep 25, 2025
223d27f
overlap upset fixed
prmunday Sep 25, 2025
03bd9a1
ignote test ipynb
prmunday Sep 25, 2025
724e7a5
lower mhc-tp threshhold
prmunday Sep 25, 2025
0ea6a5a
lower mhc-tp threshold
prmunday Sep 25, 2025
1852585
Updated majority voted downloadable files
prmunday Sep 26, 2025
0a1d196
majority voting html update
prmunday Sep 26, 2025
efd93e2
majority voted output file update
prmunday Sep 26, 2025
95e91d2
updates tools for docker purpose
prmunday Sep 28, 2025
2fbaee8
try mhc-tp
prmunday Sep 28, 2025
61734c3
docker update
prmunday Sep 28, 2025
0cf60ee
MHC-TP dir name update
prmunday Sep 28, 2025
8179c73
reverse mhc-tp name
prmunday Sep 28, 2025
090ba9e
undo error bars
prmunday Sep 29, 2025
6aab6dd
seq2logo div available always
prmunday Sep 29, 2025
72f3907
control file fix
prmunday Sep 29, 2025
e69bf53
add logs in save binding info method and enabled mixmhc2pred for savi…
prmunday Sep 30, 2025
f529446
netmhc2pan prediction fix
prmunday Sep 30, 2025
ccad283
seq2logo fix for class 2
prmunday Sep 30, 2025
5b3a9c4
label gibbs result with mhc-tp conditionally
prmunday Sep 30, 2025
8778e37
fix mixmhc2pred tool specific names
prmunday Sep 30, 2025
64187c8
update base page
prmunday Oct 1, 2025
6c0a587
analytics page update
prmunday Oct 1, 2025
db532af
not show overlap upset for class 2
prmunday Oct 1, 2025
37e6108
use cors to generate upset plot for binder netmhc2pan
prmunday Oct 2, 2025
59d8c80
ability to name the job
prmunday Oct 2, 2025
e160d84
send back email with job name in it
prmunday Oct 2, 2025
b684c08
bug
prmunday Oct 2, 2025
3b69757
update pepscanner text
prmunday Oct 4, 2025
31d0d77
add border to analytics section
prmunday Oct 4, 2025
583b263
updated text alignment
prmunday Oct 4, 2025
0d7d9b8
url update
prmunday Oct 5, 2025
32156ed
addition of banner
prmunday Oct 6, 2025
61722a6
identation fix
prmunday Oct 6, 2025
5b4174a
banner update
prmunday Oct 6, 2025
5968e20
banner update
prmunday Oct 7, 2025
f8cf836
git commit -m "Stop tracking static/images symlink"
prmunday Oct 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
app/tools
app/static/images/*
app/static/images
app/__pycache__/*
__pycache__/
immunolyser-data/*
lenv/*
lenv/*
results.sqlite
.vscode/launch.json
test.py
data_files/*
data_files_2/*
tools/*
test.ipynb
179 changes: 179 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
FROM python:3.12-slim

# Set the working directory in the container
WORKDIR /app

# Install build tools, R, tcsh, and other required dependencies
RUN apt-get update && apt-get install -y \
git \
tar \
build-essential \
wget \
libssl-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
zlib1g-dev \
r-base \
man-db \
ncompress \
tcsh \
&& \
wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs926/ghostscript-9.26.tar.gz && \
tar -xzf ghostscript-9.26.tar.gz && \
cd ghostscript-9.26 && \
./configure && make && make install && \
pip3 install --no-cache-dir gdown && \
apt-get clean && rm -rf /var/lib/apt/lists/*

# Clone the repository
RUN git clone https://github.com/prmunday/Immunolyser /app/Immunolyser

# Change to the repository directory
WORKDIR /app/Immunolyser

# Checkout the develop branch
RUN git fetch origin develop && \
git checkout develop && \
git pull

# Copy the seq2logo tar.gz file from the local tools folder to the container
COPY /tools/seq2logo-2.1.all.tar.gz /app/Immunolyser/app/tools/

# Create a tools directory and extract the tar.gz file there
RUN mkdir -p /app/Immunolyser/app/tools && \
tar -xzf /app/Immunolyser/app/tools/seq2logo-2.1.all.tar.gz -C /app/Immunolyser/app/tools && \
rm /app/Immunolyser/app/tools/seq2logo-2.1.all.tar.gz

# Copy the gibbscluster tar.gz file to the container
COPY /tools/gibbscluster-2.0f.Linux.tar.gz /app/Immunolyser/app/tools/

# Extract gibbscluster tar.gz
RUN mkdir -p /app/Immunolyser/app/tools && \
tar -xvf /app/Immunolyser/app/tools/gibbscluster-2.0f.Linux.tar.gz -C /app/Immunolyser/app/tools && \
rm /app/Immunolyser/app/tools/gibbscluster-2.0f.Linux.tar.gz

# Update GIBBS path in the gibbscluster file
RUN sed -i 's|setenv\s*GIBBS .*|setenv GIBBS /app/Immunolyser/app/tools/gibbscluster-2.0|' /app/Immunolyser/app/tools/gibbscluster-2.0/gibbscluster

# Comment out the line containing '$resdir .= "/$prefix";' in GibbsCluster-2.0e_SA.pl; command update for seq2logo and gibbs
RUN sed -i \
-e 's|^\(\s*\$resdir .= "/\$prefix";\)|# \1 # Comment or remove this line|' \
-e 's|^\(my \$barplot = "\$resdir/images/\$prefix.gibbs.KLDvsCluster.barplot.png";\)|my \$barplot = "\$resdir/images/gibbsKLDvsCluster.barplot.JPG";|' \
-e '530s@.*@$cmd .= "$seq2logo -f $corefile -o $logofile -I 2 --format [JPEG] -b $wlc -C 2 -S 2 -t $title \&>/dev/null; ";@' \
/app/Immunolyser/app/tools/gibbscluster-2.0/GibbsCluster-2.0e_SA.pl

# Copy the netMHCpan tar.gz file to the container
COPY /tools/netMHCpan-4.2b.Linux.tar.gz /app/Immunolyser/app/tools/

# Uncompress and untar the netMHCpan package
RUN mkdir -p /app/Immunolyser/app/tools && \
cat /app/Immunolyser/app/tools/netMHCpan-4.2b.Linux.tar.gz | gunzip | tar xvf - -C /app/Immunolyser/app/tools && \
rm /app/Immunolyser/app/tools/netMHCpan-4.2b.Linux.tar.gz && \
mkdir -p /app/Immunolyser/app/tools/netMHCpan-4.2/tmp

# Copy the netMHCIIpan tar.gz file to the container
COPY /tools/netMHCIIpan-4.3i.Linux.tar.gz /app/Immunolyser/app/tools/

# Uncompress and untar the netMHCIIpan package
RUN mkdir -p /app/Immunolyser/app/tools && \
tar -xvf /app/Immunolyser/app/tools/netMHCIIpan-4.3i.Linux.tar.gz -C /app/Immunolyser/app/tools && \
rm /app/Immunolyser/app/tools/netMHCIIpan-4.3i.Linux.tar.gz && \
man -d /app/Immunolyser/app/tools/netMHCIIpan-4.3/netMHCIIpan.1 | compress > /app/Immunolyser/app/tools/netMHCIIpan-4.3/netMHCIIpan.Z

# Update netMHCIIpan configuration to use the correct NMHOME path
RUN sed -i 's|setenv\s*NMHOME\s*/tools/src/netMHCIIpan-4.3|setenv NMHOME ${PWD}/app/tools/netMHCIIpan-4.3|' \
/app/Immunolyser/app/tools/netMHCIIpan-4.3/netMHCIIpan

# Update netMHCpan configuration to use the correct NMHOME and TMPDIR paths
RUN sed -i \
-e 's|setenv\s*NMHOME\s*/net/sund-nas.win.dtu.dk/storage/services/www/packages/netMHCpan/4.1/netMHCpan-4.2|setenv NMHOME ${PWD}/app/tools/netMHCpan-4.2|' \
-e 's|setenv\s*TMPDIR\s*/tmp|setenv TMPDIR $NMHOME/tmp|' \
/app/Immunolyser/app/tools/netMHCpan-4.2/netMHCpan

# Clone MixMHCpred repository
RUN git clone https://github.com/GfellerLab/MixMHCpred.git /app/Immunolyser/app/tools/MixMHCpred && \
chmod +x /app/Immunolyser/app/tools/MixMHCpred/MixMHCpred

RUN wget https://github.com/GfellerLab/MixMHC2pred/releases/download/v2.0.2.2/MixMHC2pred-2.0.zip -P /app/Immunolyser/app/tools && \
unzip -o /app/Immunolyser/app/tools/MixMHC2pred-2.0.zip -d /app/Immunolyser/app/tools/MixMHC2pred-2.0 && \
rm /app/Immunolyser/app/tools/MixMHC2pred-2.0.zip

# Download Alleles_list_Mouse.txt and put it in PWMdef directory
RUN wget http://ec2-18-188-210-66.us-east-2.compute.amazonaws.com:4000/data/Alleles_lists/Alleles_list_Mouse.txt -P /app/Immunolyser/app/tools/MixMHC2pred-2.0/PWMdef

# Clone MHC-TP and switch to netmhcpan-data-update-2025 branch
RUN git clone https://github.com/PurcellLab/MHC-TP.git /app/Immunolyser/app/tools/MHC-TP && \
cd /app/Immunolyser/app/tools/MHC-TP && \
git fetch origin netmhcpan-data-update-2025 && \
git checkout netmhcpan-data-update-2025

# Set up Python 3.11 virtual environment and install the package
RUN cd /app/Immunolyser/app/tools/MHC-TP && \
python3 -m venv hlapepclust-env && \
/bin/bash -c "source hlapepclust-env/bin/activate && pip install -e . && deactivate"

# Download the large ref_data zip file and unzip it
RUN mkdir -p /app/Immunolyser/app/tools/MHC-TP/data/ref_data && \
cd /app/Immunolyser/app/tools/MHC-TP/data/ref_data && \
python3 -m gdown 'https://drive.google.com/uc?id=1iAAvir1woMOnURkP46zr_ETqpW2oUgGD' && \
unzip Gibbs_motifs_human.zip && \
rm Gibbs_motifs_human.zip

# Install mhcflurry
RUN pip install mhcflurry

# Fetch mhcflurry downloads
RUN mhcflurry-downloads fetch

# Create a virtual environment for Python 3
RUN python3 -m venv lenv

# Install dependencies for Python 2 and Python 3
RUN /bin/bash -c "source lenv/bin/activate && \
pip install -r requirements_python2.txt && \
pip install -r requirements_python3.txt"

# Install Celery, sqlacheny
RUN /bin/bash -c "pip install celery"
RUN /bin/bash -c "pip install SQLAlchemy==2.0.31"

# Run the hotfix script
RUN /bin/bash -c "python hotfix_package_files.py"

# Download and extract Python 2.7.18
RUN wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz && \
tar xvf Python-2.7.18.tgz

# Build and install Python 2.7.18
WORKDIR Python-2.7.18
RUN ./configure && \
make && \
make install

# Install pip for Python 2.7
RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py && \
python2 get-pip.py

# Install numpy for Python 2.7
RUN python2 -m pip install numpy

# Change to the repository directory
WORKDIR /app/Immunolyser

# Expose Flask and Celery ports
EXPOSE 5000
EXPOSE 5555

# Set a default environment variable for IMMUNOLYSER_DATA
ENV IMMUNOLYSER_DATA=/app/data

# Copy entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Create the results.sqlite file
RUN touch /results.sqlite

# Set the entrypoint script
ENTRYPOINT ["/entrypoint.sh"]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Documentation

- Main Documentation
- [Immunolyser 2.0 Offline Setup Guide](Documentation/Immunolyser_2.0_Offline_Setup_Guide.md)

<h4>Demo and example input</h4>
<p>
A demo report has been generated to demonstrate the organisation and features of analysis results. It can be accessed by clicking on the <a href="https://immunolyser.erc.monash.edu/demo">Demo</a> tab. To test the pipeline end-to-end, the example files (exported from PEAKs) can be downloaded from <a href="https://immunolyser.erc.monash.edu/static/temp/Study%20by%20Son,%20Eric%20T.,%20et%20al.zip" target="_blank"> here</a> and uploaded in the demo <a href="https://immunolyser.erc.monash.edu/initialiser">initialiser</a> module to run the analysis. The dataset provided and used to generate the demo report are from the recent immunopeptidomic study by Son, Eric T., et al. In addition, we attached <a href="https://immunolyser.erc.monash.edu/static/temp/demo%20data%20from%20multiple%20softwares.zip" target="_blank"> example input files</a> exported from other search engines, including Skyline, ProteinPilot, Spectronaut, and DIA-NN.
</p>

<p>
The input files used to generate figures in the manuscript can be accessed <a href="https://drive.google.com/drive/folders/14bICyGjIlZl3dCtV3qYZ7GKDNCORyB9U?usp=drive_link" target="_blank">here</a>.
</p>
65 changes: 31 additions & 34 deletions app/Pepscan.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import pandas as pd
import numpy as np

from matplotlib import pyplot as plt
import matplotlib
matplotlib.use('agg')
import seaborn as sns

import io
import base64
import os
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas


project_root = os.path.dirname(os.path.realpath(os.path.join(__file__, "..")))

Expand Down Expand Up @@ -63,6 +60,15 @@ def clean(self):
#clean_frame["Peptide"] = clean_frame["Peptide"].str.replace(r'\(.*\.\d*\)', '')
clean_frame["Peptide"] = clean_frame["Peptide"].str.replace(r'\(.{4,7}\)', '')
clean_frame = clean_frame.dropna(subset = ["Accession"]).reset_index(drop = True)

# Calculate the initial number of rows
initial_count = len(clean_frame)
clean_frame = clean_frame[~clean_frame['Accession'].str.contains('CONTAM|DECOY', na=False)].reset_index(drop=True)
# Calculate the number of rows dropped
rows_dropped = initial_count - len(clean_frame)
# Print the number of rows dropped
print(f"Number of rows dropped where Accession had 'CONTAN' or 'DECOY' marked,: {rows_dropped}")

self.peptide_frame = clean_frame

def get_locs(self):
Expand Down Expand Up @@ -91,7 +97,7 @@ def get_rel_locs(self):
rel_locs.append(self.protein_frame["Location"][row]/len(self.protein_frame["Sequence"][row]))
return rel_locs

def search_proteome(self, peptide_file, proteome_file = "uniprot-proteome_UP000005640.fasta",accessionsids='accessionsids'):
def search_proteome(self, peptide_file, proteome_file = "uniprot-proteome_UP000005640.fasta"):
"""Searches a proteome (proteome_file) and retrieves all protein sequences referenced by protein IDs corresponding to peptides stored in a PEAKS output csv (peptide_file)

Keyword Arguments:
Expand All @@ -107,9 +113,6 @@ def search_proteome(self, peptide_file, proteome_file = "uniprot-proteome_UP0000
ids = []
use_id = []

# Importing unique accession ids for reference
accessionids = pd.read_csv(accessionsids)['ID'].to_list()

#Retrieve most confident accession for each peptide
for all_accession in self.peptide_frame["Accession"]:
all_accession = all_accession.split(":")
Expand All @@ -136,8 +139,18 @@ def search_proteome(self, peptide_file, proteome_file = "uniprot-proteome_UP0000
self.peptide_frame["Location"] = "No protein found"
#Add peptide count column to proteome to keep track of peptides/protein
proteome_frame["Peptides"] = 0
#join peptide and protein dataframes
self.protein_frame = self.peptide_frame[["ID", "Peptide"]].join(proteome_frame[["ID", "Sequence"]].set_index("ID"), on = "ID", how = "inner", lsuffix = "_pep", rsuffix = "_prot")

# Keep only rows with valid string/int IDs
valid_peptide_frame = self.peptide_frame[self.peptide_frame["ID"].apply(lambda x: isinstance(x, (str, int)))]

self.protein_frame = valid_peptide_frame[["ID", "Peptide"]].join(
proteome_frame[["ID", "Sequence"]].set_index("ID"),
on="ID",
how="inner",
lsuffix="_pep",
rsuffix="_prot"
)

#retrieve locations for all peptides
self.protein_frame.reset_index(drop = True, inplace = True)
self.protein_frame["Location"] = self.get_locs()
Expand All @@ -155,8 +168,14 @@ def protein_dist(self, protein):
peptides = self.protein_frame[self.protein_frame["ID"] == protein]
peptides.reset_index(drop = True, inplace = True)
locations = [0]*100

#calculate relative length of peptides
for pep in range(len(peptides)):

# Ammend by Prithvi: Skipping adding the location of the peptide if peptide not found in the protein
if peptides["Location"][pep] == "No Position Found":
continue

start = int(peptides["Relative Location"][pep]//0.01)
end = int(((int(peptides["Location"][pep]) + len(peptides["Peptide"][pep]) - 1)/len(peptides["Sequence"][pep]))//0.01)
#increment count for each relative position
Expand Down Expand Up @@ -196,27 +215,5 @@ def peptide_dist(self, proteins, taskId):
#search proteome file for source proteins of peptide file
# scanner.search_proteome(peptide_file = "VMM1_1st_nil_DT9_peptide_C0303_NetMHCpan_binders.csv", proteome_file = "uniprot-proteome_UP000005640.fasta")
scanner.search_proteome(peptide_file = "elutiondata.csv", proteome_file = "uniprot-proteome_UP000005640.fasta")
#display plot
# scanner.peptide_dist(['P01903',
# 'P30504',
# 'Q6ZS81',
# 'A0A0G2JMH6',
# 'P49327',
# 'P19320',
# 'A0A0U1RQF0',
# 'Q9UIQ6',
# 'P20273',
# 'P18583',
# 'Q15751',
# 'P30505',
# 'E7EPN9',
# 'Q29865',
# 'Q9Y520',
# 'A0A1W2PR11',
# 'Q01082',
# 'P13284',
# 'A0A1W2PRZ0',
# 'Q95604'])

scanner.peptide_dist(["Q96C19", "P04818", "F8W6I7", "A0A0U1RQF0"])
#view peptide/source protein table
#print(scanner.protein_frame)
21 changes: 20 additions & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
from flask import Flask, render_template
from flask_restplus import Api
from config import Config
from celery import Celery
import os

def make_celery(app):
celery = Celery(
app.import_name,
backend=app.config['CELERY_RESULT_BACKEND'],
broker=app.config['CELERY_BROKER_URL']
)
celery.conf.update(app.config)

class ContextTask(celery.Task):
def __call__(self, *args, **kwargs):
with app.app_context():
return self.run(*args, **kwargs)
celery.Task = ContextTask
return celery

api = Api()

Expand All @@ -12,8 +29,10 @@ def index():

app.config.from_object(Config)

celery = make_celery(app)

api.init_app(app)

from app import routes

app.run(host='0.0.0.0', port=5000)
# app.run(debug=True)
Loading