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