Skip to content

Commit

Permalink
Merge pull request #34 from LUMC/baselinechangeo
Browse files Browse the repository at this point in the history
Make baseline and changeO separately runnable
  • Loading branch information
rhpvorderman authored Jan 10, 2024
2 parents 91fd26f + 546042a commit 079b489
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 26 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
version 1.10.0-dev
------------------
+ Replace "fast" option with options to toggle baseline and Change-O indidually.

version 1.9.1
-----------------
+ Fix error in launch command.
Expand Down
38 changes: 17 additions & 21 deletions shm_csr.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="shm_csr" name="SHM &amp; CSR pipeline" version="1.9.1" profile="16.04">
<tool id="shm_csr" name="SHM &amp; CSR pipeline" version="1.10.0-dev" profile="16.04">
<description></description>
<requirements>
<requirement type="package" version="3.7.1">python</requirement>
Expand Down Expand Up @@ -35,7 +35,7 @@
$filter_unique.filter_unique_clone_count
$class_filter_cond.class_filter
$empty_region_filter
$fast
$changeo $baseline
#else:
$__tool_directory__/wrapper.sh "$in_file"
custom
Expand All @@ -48,7 +48,7 @@
2
$class_filter_cond.class_filter
$empty_region_filter
$fast
$changeo $baseline
#end if
]]>
</command>
Expand Down Expand Up @@ -108,59 +108,55 @@
</param>
</conditional>
<conditional name="naive_output_cond">
<param name="naive_output" type="select" label="Output new IMGT archives per class into your history?">
<option value="yes">Yes</option>
<option value="no" selected="true">No</option>
</param>
<when value="yes"></when>
<when value="no"></when>
</conditional>
<param name="fast" type="select" label="Fast" help="Skips Change-O/Baseline" >
<option value="yes">Yes</option>
<option value="no" selected="true">No</option>
</param>
<param name="naive_output" type="boolean" label="Output new IMGT archives per class into your history?"
checked="no" truevalue="yes" falsevalue="no"/>
</conditional>
<param name="changeo" type="boolean" label="Run Change-O"
checked="yes" truevalue="yes" falsevalue="no"/>
<param name="baseline" type="boolean" label="Run Baseline"
checked="yes" truevalue="yes" falsevalue="no"/>
</inputs>
<outputs>
<data format="html" name="out_file" label = "SHM &amp; CSR on ${in_file.name}"/>
<data format="imgt_archive" name="naive_output_ca" label = "Filtered IMGT IGA: ${in_file.name}" >
<filter>naive_output_cond['naive_output'] == "yes"</filter>
<filter>naive_output_cond['naive_output'] is True</filter>
<filter>class_filter_cond['class_filter'] != "101_101"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGG"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGM"</filter>
</data>
<data format="imgt_archive" name="naive_output_cg" label = "Filtered IMGT IGG: ${in_file.name}" >
<filter>naive_output_cond['naive_output'] == "yes"</filter>
<filter>naive_output_cond['naive_output'] is True</filter>
<filter>class_filter_cond['class_filter'] != "101_101"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGA"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGM"</filter>
</data>
<data format="imgt_archive" name="naive_output_cm" label = "Filtered IMGT IGM: ${in_file.name}" >
<filter>naive_output_cond['naive_output'] == "yes"</filter>
<filter>naive_output_cond['naive_output'] is True</filter>
<filter>class_filter_cond['class_filter'] != "101_101"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGA"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGG"</filter>
</data>
<data format="imgt_archive" name="naive_output_ce" label = "Filtered IMGT IGE: ${in_file.name}" >
<filter>naive_output_cond['naive_output'] == "yes"</filter>
<filter>naive_output_cond['naive_output'] is True</filter>
<filter>class_filter_cond['class_filter'] != "101_101"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGA"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGG"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGM"</filter>
</data>
<data format="imgt_archive" name="naive_output_igm_naive" label = "Filtered naive IGM sequences (mutations below 2%): ${in_file.name}">
<filter>naive_output_cond['naive_output'] == "yes"</filter>
<filter>naive_output_cond['naive_output'] is True</filter>
<filter>class_filter_cond['class_filter'] != "101_101"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGA"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGG"</filter>
</data>
<data format="imgt_archive" name="naive_output_igm_naive_memory" label = "Filtered naive memory IGM sequences (mutations over 2%): ${in_file.name}">
<filter>naive_output_cond['naive_output'] == "yes"</filter>
<filter>naive_output_cond['naive_output'] is True</filter>
<filter>class_filter_cond['class_filter'] != "101_101"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGA"</filter>
<filter>class_filter_cond['class_filter'] != "101_101_IGG"</filter>
</data>
<data format="imgt_archive" name="naive_output_all" label = "Filtered IMGT all: ${in_file.name}" >
<filter>naive_output_cond['naive_output'] == "yes"</filter>
<filter>naive_output_cond['naive_output'] is True</filter>
<filter>class_filter_cond['class_filter'] == "101_101"</filter>
</data>
</outputs>
Expand Down
6 changes: 4 additions & 2 deletions tests/test_shm_csr.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def shm_csr_result():
# anyway and take most of the test time to execute. The environment
# variable can be set to "no" on the CI so the code path is tested
# at the time a PR is ready.
fast = os.environ.get("SHM_CSR_FAST", "yes")
run_changeo = "yes" if os.environ.get("SHM_CSR_FAST") == "no" else "no"
run_baseline = "yes" if os.environ.get("SHM_CSR_FAST") == "no" else "no"
cmd = [
"bash",
wrapper,
Expand All @@ -108,7 +109,8 @@ def shm_csr_result():
filter_unique_count,
class_filter,
empty_region_filter,
fast
run_changeo,
run_baseline
]
docker_cmd = ["docker", "run", "-v", f"{temp_dir}:{temp_dir}",
"--rm", # Remove container after running
Expand Down
7 changes: 4 additions & 3 deletions wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ filter_unique=${17}
filter_unique_count=${18}
class_filter=${19}
empty_region_filter=${20}
fast=${21}
run_changeo=${21}
run_baseline=${22}
BASENAME=$(basename "$title")
# Cut off .txz or .tgz suffix and also replace spaces with underscores.
NEW_IMGT_PREFIX="new_IMGT_${BASENAME%.*}"
Expand Down Expand Up @@ -410,7 +411,7 @@ count_imgt_lines () {
rm 1_Summary.txt
}

if [[ "$fast" == "no" ]] ; then
if [[ "$run_baseline" == "yes" ]] ; then



Expand Down Expand Up @@ -524,7 +525,7 @@ cat $dir/shm_csr.htm >> $output

echo "</div>" >> $output #CSR tab end

if [[ "$fast" == "no" ]] ; then
if [[ "$run_changeo" == "yes" ]] ; then

echo "---------------- change-o MakeDB ----------------"

Expand Down

0 comments on commit 079b489

Please sign in to comment.