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

Disconnect confidence from species and seq type inference

parent 43f749d8
Branches
Tags
2 merge requests!76Develop,!71Seqwho
Pipeline #9304 passed with stages
in 3 hours, 45 minutes, and 3 seconds
......@@ -741,6 +741,11 @@ process seqwho {
seqtypeConfidenceR2="1"
fi
speciesErrorSeqwho=false
speciesErrorSeqwho_details=""
seqtypeError=false
seqtypeError_details=""
# convert numeric confidence to string
if [ \${speciesConfidenceR1} == "1" ]
then
......@@ -768,46 +773,46 @@ process seqwho {
fi
echo -e "LOG: confidence converted to string" >> ${repRID}.seqwho.log
# detect errors
speciesErrorSeqwho=false
speciesErrorSeqwho_details=""
seqtypeError=false
seqtypeError_details=""
if [ "\${confidenceR1}" == "high" ] && [ "\${confidenceR2}" == "high" ]
# set species
if [ "\${speciesR1}" == "\${speciesR2}" ]
then
echo -e "LOG: high confidence inference detected" >> ${repRID}.seqwho.log
if [ "\${speciesR1}" == "\${speciesR2}" ]
speciesInfer=\${speciesR1}
if [ "\${speciesInfer}" == "human" ]
then
speciesInfer=\${speciesR1}
if [ "\${speciesInfer}" == "human" ]
then
speciesInfer="Homo sapiens"
elif [ "\${speciesInfer}" == "mouse" ]
then
speciesInfer="Mus musculus"
fi
echo -e "LOG: concordant species inference: \${speciesInfer}" >> ${repRID}.seqwho.log
else
speciesErrorSeqwho=true
speciesErrorSeqwho_details="**Infered species does not match for R1 and R2:** Infered R1 = \${speciesR1} and infered R2 = \${speciesR2}"
echo -e "LOG: inference error: \${speciesErrorSeqwho_details}" >> ${repRID}.seqwho.log
speciesInfer="Homo sapiens"
elif [ "\${speciesInfer}" == "mouse" ]
then
speciesInfer="Mus musculus"
fi
if [ "\${seqtypeR1}" == "\${seqtypeR2}" ]
echo -e "LOG: concordant species inference: \${speciesInfer}" >> ${repRID}.seqwho.log
else
speciesErrorSeqwho=true
speciesErrorSeqwho_details="**Infered species does not match for R1 and R2:** Infered R1 = \${speciesR1} and infered R2 = \${speciesR2}"
echo -e "LOG: inference error: \${speciesErrorSeqwho_details}" >> ${repRID}.seqwho.log
fi
# set seq type
if [ "\${seqtypeR1}" == "\${seqtypeR2}" ]
then
if [ "\${seqtypeR1}" == "rnaseq" ]
then
if [ "\${seqtypeR1}" == "rnaseq" ]
then
seqtpeInfer="rnaseq"
echo -e "LOG: concordant rnaseq seq type inference detected" >> ${repRID}.seqwho.log
else
seqtypeError=true
seqtypeError_details="**Infered sequencing type is not mRNA-seq:** Infered = \${seqtypeR1}"
echo -e "LOG: inference error: \${seqtypeError_details}" >> ${repRID}.seqwho.log
fi
seqtpeInfer="rnaseq"
echo -e "LOG: concordant rnaseq seq type inference detected" >> ${repRID}.seqwho.log
else
seqtypeError=true
seqtypeError_details="**Infered sequencing type does not match for R1 and R2:** Infered R1 = \${seqtypeR1} and infered R2 = \${seqtypeR2}"
seqtypeError_details="**Infered sequencing type is not mRNA-seq:** Infered = \${seqtypeR1}"
echo -e "LOG: inference error: \${seqtypeError_details}" >> ${repRID}.seqwho.log
fi
else
seqtypeError=true
seqtypeError_details="**Infered sequencing type does not match for R1 and R2:** Infered R1 = \${seqtypeR1} and infered R2 = \${seqtypeR2}"
echo -e "LOG: inference error: \${seqtypeError_details}" >> ${repRID}.seqwho.log
fi
# detect confidence errors
if [ "\${confidenceR1}" == "high" ] && [ "\${confidenceR2}" == "high" ]
then
echo -e "LOG: high confidence inference detected" >> ${repRID}.seqwho.log
else
speciesErrorSeqwho=true
speciesErrorSeqwho_details=\$(echo "**Infered species and or sequencing type confidence is low:**\\n")
......
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