Skip to content
Snippets Groups Projects
Commit 7d1e7925 authored by Hottlet Valentin's avatar Hottlet Valentin
Browse files

Add dynamic minimum peaks configuration to form and backend

parent 9ca591a7
No related branches found
No related tags found
1 merge request!8Tests docker
......@@ -83,6 +83,7 @@ RUN chown -R www-data:www-data /var/www
# RUN git clone https://github.com/touzet/pampa.git /var/www/cgi-bin/pampa/pampa/
# ajustement pour version web : pas de print sur sdtout mais envoie d'une réponse CGI de type content-type/html
COPY ./pampa /var/www/cgi-bin/pampa/pampa
RUN cp /var/www/cgi-bin/pampa/pampa/config.json /var/www/html/pampa/data_pampa/config.json
COPY ./main_taxonomy_filtering.py /var/www/cgi-bin/pampa/pampa/
COPY ./table_maker.py /var/www/cgi-bin/pampa/pampa
......
......@@ -236,6 +236,19 @@ def extract_request(form):
fOut.write(f"PTM={req['limit_PTM']} ")
fOut.write("\n")
if form["minimum_peaks"].value != "" and form["minimum_peaks"].value != "5":
minimum = form["minimum_peaks"].value
else:
minimum = None
if minimum:
with open(f'{common.CONFIG_FILE}', 'r') as f:
data = json.load(f)
data['min_number_of_peaks'] = minimum
json.dump(data, open(f'{resdir}/config.json', 'w'))
log.write(f"Digestion set to {minimum}\n")
req['config_file'] = resdir + '/config.json'
log.write("Recap downloads :\n")
for fn in req['files_uploaded']:
log.write(f"dwl {fn}\n")
......@@ -273,6 +286,8 @@ def launch_software(run_id, req):
command += ' -n ' + req["nearoptimal_margin"]
if "nearoptimal_all" in req:
command += ' -a '
if "config_file" in req:
command += ' -c ' + req['config_file']
command += " --web" # Web version with log file and no console output
open("acommand.txt", "w").write(f"{command}") # log
......
{
"taxonomy_ranks": ["subspecies", "Subspecies","species", "Species", "genus", "Genus", "subfamily", "Subfamily","family","Family", "suborder", "Suborder", "order", "Order", "class", "Class", "phylum", "Phylum"],
"peptide_table_order":["Rank", "TaxID", "OX", "OS", "Taxon Name", "Taxon name", "Taxon", "Sequence", "PTM", "Mass", "Marker", "GN", "Gene", "Hel", "Length", "SeqID", "SeqId", "Begin", "End", "Status", "Comment"],
"enzyme": "trypsin",
"number_of_missed_cleavages": 1,
"min_peptide_length":12,
"max_peptide_length":33,
"minimum_number_of_peaks": 5,
"marker_order": ["P1", "COL1A1-508/P1", "COL1A1-508", "A", "COL1A2-978/A", "COL1A2-978", "B", "COL1A2-484/B", "COL1A2-484", "C", "COL1A2-502/C","COL1A2-502", "P2","COL1A2-292/P2", "COL1A2-292", "D","COL1A2-793/D", "COL1A2-793", "E", "COL1A2-454/E", "COL1A2-454", "F", "COL1A1-586/F", "COL1A1-586","F'", "G", "COL1A2-757/G", "COL1A2-757", "G'"]
}
......@@ -56,6 +56,16 @@
</table>
<br>
<b>Minimum peaks configuration</b>
<table class="vide pampa_choice">
<tr>
<td>
<input type="number" name="minimum_peaks" step="1" min="1" max="100" value="5" required>
</td>
</tr>
</table>
<br>
<b>Mass error tolerance</b>
<table class="vide pampa_choice">
<tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment