Quote:
Originally Posted by
cmccabe
If
CLINSIG has a value in it of Benign, then for the particular line the
Classification is
Benign. So I guess if
CLINSIG has a value in it then that is the
Classification and none of the conditions are applied.
My actual dataset does have some fields with null values in it. but I filled in those with
., that is what I mean by there are no empty fields.
I am not sure what you mean by
already, you are correct that only
Classification is assigned a value.
The first condition does unconditionally set
Classification to
VUS. That seems to be working.
Condition 2 sets the
Classification to the value of
CLINSIG unless
CLINSIG has multiple values in it like in line 3 of
file (if there are multiple values in it they are separated by a
|. If this is the case then
Classification is
Conflicting.
Condition 3 is only run on the lines
where Func.IDP.refGene =
UTR then the value of
Classification is
Likely Benign,
if
CLINSIG is set to
VUS, if it is any other value it is not changed.
Condition 4 is if the
PopFreqMax >
.01 then the
Classification is
Likely Benign unless there is a value other
then
VUS there. If there is that means
CLINSIG had a value already.
Condition 5 is only run if
Func.IDP.refGene =
spicing AND
GeneDetail.IDP.refGene has
+/- symbol in it AND the number
after it is
> 10 then the value of Classification is Likely Benign, unless there is a value other
then
VUS there. If there is that means
CLINSIG had a value already.
Thank you
.
There are so many conflicting requirements here that I am completely confused. From two of your paragraphs above:
Quote:
If CLINSIG has a value in it of Benign, then for the particular line the Classification is Benign. So I guess if CLINSIG has a value in it then that is the Classification and none of the conditions are applied.
Condition 2 sets the Classification to the value of CLINSIG unless CLINSIG has multiple values in it like in line 3 of file (if there are multiple values in it they are separated by a |. If this is the case then Classification is Conflicting.
The 2nd paragraph quoted above says that if a line in the input file contains an
| character in the
CLINSIG in a line, the
Classification field in the output for that line is to be set to
Conflicting. Otherwise, the
Classification field in the output for that line is to be set to the string that was in the
CLINSIG field in that input line (even if that string was an empty string or just contains a period character (
.). And, according to the last sentence in the 1st paragraph above, once this has been done Conditions 1, 3, 4, and 5 are always to be ignored. I'm sure that isn't what you mean, but it is what you have repeatedly stated.
You talked about empty fields above, but not in earlier posts. Whether or not a field is empty, it has a value. And, you have stated that if a field's value contains less than 12 characters (which certainly includes 0 if that field's value is an empty string or 1 if that field's value is a period), then that value becomes the
Classification field's value.
Since I can't make any sense out of your stated requirements, let me see if I can restate your requirements in a way that makes sense to me, hoping that I capture what you intended to say.
Requirements:
Perform the following tests in sequence until the stated condition for a test evaluates to TRUE. For the 1st test whose condition evaluates to TRUE, set the value of the
Classification field in that output line to the corresponding stated value:
- If the value of the CLINSIG field contains a | character, set the Classification to Conflicted.
- If the value of the CLINSIG field is not an empty string, is not the string ., and is not the string VUS; set the Classification field to the value of the CLINSIG field.
- If the value of the CLINSIG field is the string VUS and the value of the Func.IDP.refGene field is the string UTR, set the Classification field to the string Likely Benign.
- If the value of the CLINSIG field is the string VUS and the value of the PopFreqMax field is greater than .01, set the Classification field to the string Likely Benign.
- If the value of the CLINSIG field is the string VUS, the value of the Func.IDP.refGene is the string splicing or the string spicing, and the absolute value of the GeneDetail.IDP.refGene field is greater than 10; set the Classification field to the string Likely Benign.
- If none of the above tests succeeded, set the Classification field to the string VUS.
Would code written to meet the above restatement of your requirements do what you want.