Skip to content
Snippets Groups Projects
Commit b9798355 authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Convert strandedness from yes/no to t/f

parent 3b3b7891
Branches
Tags 0.0.3
2 merge requests!68Develop,!67Resolve "Change Single Read to Single End for submitted endness"
Pipeline #9103 failed with stages
in 28 minutes and 18 seconds
# v2.0.0
**User Facing**
* Endness metadata "Single Read" changed to "Single End" in data-hub, pipeline updated to handle (#110) ("Single Read" still acceptable for backwards compatibility)
* Strandedness metadata "yes"/"no" changed to boolean "t"/"f" in data-hub, pipeline updated to handle (#70) ("yes"/"no" still acceptable for backwards compatibility)
**Background**
* Add memory limit (75%) per thread for samtools sort (#108)
......
......@@ -367,8 +367,27 @@ process parseMetadata {
echo -e "LOG: strandedness metadata parsed: \${stranded}" >> ${repRID}.parseMetadata.log
# get spike-in metadata
spike=\$(python3 ${script_parseMeta} -r ${repRID} -m "${experimentSettings}" -p spike)
v=\$(python3 ${script_parseMeta} -r ${repRID} -m "${experimentSettings}" -p spike)
echo -e "LOG: spike-in metadata parsed: \${spike}" >> ${repRID}.parseMetadata.log
if [ "\${spike}" == "f" ]
then
spike="false"
elif [ "\${spike}" == "t" ]
then
spike="true"
elseif [ "\${spike}" == "no" ]
# "yes"/"no" depreciated as of Jan 2021, this option is present for backwards compatibility
then
spike="false"
elseif [ "\${spike}" == "yes" ]
# "yes"/"no" depreciated as of Jan 2021, this option is present for backwards compatibility
then
spike="true"
elif [ "\${spike}" == "nan" ]
then
endsRaw="_No value_"
endsMeta="NA"
fi
# get species metadata
species=\$(python3 ${script_parseMeta} -r ${repRID} -m "${experiment}" -p species)
......@@ -935,9 +954,9 @@ process inferMetadata {
# determine spike-in
if [ 1 -eq \$(echo \$(expr \${align_ercc} ">=" 10)) ]
then
spike="yes"
spike="true"
else
spike="no"
spike="false"
fi
echo -e "LOG: inference of strandedness results is: \${spike}" >> ${repRID}.inferMetadata.log
......
......@@ -73,12 +73,7 @@ def main():
# Get spike-in metadata from 'Experiment Settings.csv'
if (args.parameter == "spike"):
if (metaFile.Used_Spike_Ins.unique() == "yes"):
spike = "yes"
elif (metaFile.Used_Spike_Ins.unique() == "no"):
spike = "no"
else:
spike = metaFile.Used_Spike_Ins.unique()[0]
spike = metaFile.Used_Spike_Ins.unique()[0]
print(spike)
# Get species metadata from 'Experiment.csv'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment