I am adding the below condition to change the classification of line 3 to Likely Benign. If $Score was 20 and the PopFreqMax being what it is 0.003 it would follow the default rule.
However, because in the GeneDetailIDPrefGene section the digit 50, that is stripped off of the >50 is greater than 10, so classification is Likely Benign. I know the code that strips of the 50 works, but am I doing something else wrong? Thank you .
Last edited by cmccabe; 04-10-2017 at 09:58 AM..
Reason: fixed format
Below is the updated code along with attempt to fix the message. The sections in bold were updated accordingly, however the new message seems to give a different message but allows the script to run. I am a little confused as this line seems to be important but the script ignores it/ or skips it? Thank you .
adding the ; indicated by the message but the script does execute
Last edited by cmccabe; 04-10-2017 at 02:03 PM..
Reason: adding bold and highlighting to make it easier to read
Hi cmccabe,
Please, take a look again at post #16. I highlighted for you how it needs to be if you mean it as such. $1 > 10; It is useless as the message says.
It would be the equivalent of _the sky is blue_. So what? No flow control, there.
If the code runs it would always be $classification = 'Likely Benign' as soon as the if is met.
I apologize I read the post incorrectly. I am not sure why line 1 in the attached file.txt should be VUS set by the default classification. That is correct. However, when the two conditions below are added the first behaves as expected. The second (after the else) changes the first line to Likely Benign. However, it should not be applied as $FuncIDPrefGene does not equal exonic. Is there something wrong with my logic? Thank you for all your help .
its mission is to make $classification = 'Likely Benign', however the condition above does that job already since the $Score is less than 5, regardless if it is not exonic nor the $GeneDetailIDPrefGene is more than 10.
else {
my $transcript = $FuncIDPrefGene !~/exonic/i &&$GeneDetailIDPrefGene=~/\.\d+[\+\-](\d+)/;
if ($transcript > 10) {
$classification = 'Likely Benign';
}
}
The highlighted part does not work for >50 which is what the last line has.
Perhaps this might help, instead
Code:
if ($Score < 5 || $PopFreqMax > 0.011) {
$classification = 'Likely Benign';
}
if ($FuncIDPrefGene !~ /exonic/i) {
# Get a numeric value if exist.
my ($transcript) = ($GeneDetailIDPrefGene) =~ /(?:\.\d+[+-]|\D)(\d+)/;
# Give it a value of zero if no numeric value was found.
$transcript //= 0;
$classification = 'Likely Benign' if $transcript > 10;
}
Using the lines below I am trying to update the $classification by using the rules in the description, but can not get the desired output. Thank you for all your help, I really appreciate it .
Description:
In the first line classification updated toPathogenic because it follows the rules of the second else statement
In the second line the first else statement is used to update classification
In the third line the first if statement is used to update classification because it is a single entry with no |
ClinSig ---- only allow single entries in classification ----
Code:
Benign is single entry
Benign|Likely benign|Unknown is a multiple entry
Since a | (pipe) character is always presents for multiple entries, maybe: (seems to execute but nothing changes in classification)-
Code:
if ($ClinSig !~/untested|unknown|not provided|other/i && $ClinSig ne "." && $ClinSig ne "|") {
$classification = $ClinSig;
}
}
else {
if ($ClinSig !~/Pathogenic|Likely pathogenic|Uncertain significance/i || $ClinSig eq ".") {
$classification = 'Likely Benign';
}
}
else {
if ($ClinSig eq "Pathogenic|Likely pathogenic|Uncertain significance" && $ClinSig ne ".") {
#$classification = 'Pathogenic';
}
}
desired classification
Code:
Pathogenic
Likely Benign
Uncertain signiffigance
Last edited by cmccabe; 04-11-2017 at 11:11 AM..
Reason: fixed format
Good Day All,
I need to make a script that will do the following :
1- read a .csv file line by line, check the 3 field of each file print the whole line if
this field matches the condition (note : FS = ",")
2-from the basic file, the script should genrate 3 new files based on the step #1... (6 Replies)
Hi,
I have 500 MB of file.
I want to retain first line and last line of the file.
I am unaware of deleting lines from a file in PERL.
How can i do it in PERL?
Regards
VANITHA (3 Replies)
Dear All,
I need to classify my data into sets or ranges based on values in the second column of a file as - low medium and high.
INPUT:
file1.dat
1.tmp 1.03
2.tmp 0.38
3.tmp 3.23
4.tmp 1.34
I would like to classify all the numerical values into a range based on the followng... (3 Replies)
Hi,
I want to match the time in the file and retrieve those contents of the file.
I am taking only first two parameters of localtime(time) function minutes and seconds so partial match i am performing.
For Example
$start = "14:23";
$end = "14:30";
I am matching file contents... (3 Replies)
i try to do this for a long time
input is command ls -l
and output is:
Number of files : xx
Number of file type – awk : 5 total size: 2345 bytes // file ex type .awk
Number of file type – dat : 10 total size: 233 bytes // file ex type .dat
...
Number of unknown file type... (1 Reply)
I've hunted and hunted but nothing seems to apply to what I need. Any help will be much appreciated!
My input file looks like (Unix):
marker,allele1,allele2
RS1002244,1,1
RS1002244,1,3
RS1002244,3,3
RS1003719,2,2
RS1003719,2,4
RS1003719,4,4
Most markers are listed 3 times but a few... (2 Replies)
Can anyone tell me what could be the solution to following :
I have one .txt file which contains some seed information. This seed may appear multiple time in the file so what I want do is if this seed appears again in the file then that line should be removed.
here is the contents of .txt... (5 Replies)
Hi
I have a file from which i need to remove the first 4 and the last 2 lines.. i know how to do it with sed but i need to do it in a perl script.. can you please help me how to do that.
Thanks (10 Replies)