I want to extract some info from the following input line using perl regular expression. I will appreciate any help in doing so.
input line:
hg19_ensGene_EN ST00000237247 range=chr1:6720 8779-67210057 5'pad=0 3'pad=0 strand=+ repeatMasking=n one
info to be extracted:
chr1:67208779-67210057:+
The perl code i use till now that works successfully is:
extracts the following info:chr1:67208 779-67210057
however i am unable to extract + info from the input line above.
input line:
hg19_ensGene_EN ST00000237247 range=chr1:6720 8779-67210057 5'pad=0 3'pad=0 strand=+ repeatMasking=n one
info to be extracted:
chr1:67208779-67210057:+
The perl code i use till now that works successfully is:
Code:
while(<LOC>){
chomp;
if(/^>(\w+)\s\w+\=(chr\w+)\:(\d+)\-(\d+)/)
$loc{$1} = "$2:$3:$4:$5";
print $loc{$1}."\n";
}
}
however i am unable to extract + info from the input line above.
Comment