Change the notation algorithm to take advantage of the new CAU tRNA
reference library Former-commit-id: 32650f41c4a7f95ce5da78c1f520438b35c1d4d1 Former-commit-id: 7ee31aaed2aca437b689fc7930095279fce0051b
This commit is contained in:
@ -54,40 +54,76 @@ function epissage(intron,seq) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function patchtRNA(anticodon,trna,seq) {
|
function patchtRNA(anticodon,trna,seq) {
|
||||||
|
|
||||||
|
delete res;
|
||||||
|
delete maxi;
|
||||||
|
delete score;
|
||||||
|
delete field;
|
||||||
|
delete f2;
|
||||||
|
|
||||||
if (anticodon == "cat") {
|
if (anticodon == "cat") {
|
||||||
file=printfasta(trna "_" anticodon,seq,"");
|
file=printfasta(trna "_" anticodon,seq,"");
|
||||||
|
|
||||||
command= "sumatra -t 0.9 -x -n " file " " trnalib() " 2>> /dev/null";
|
command= "sumatra -x -n " file " " trnalib() " 2>> /dev/null";
|
||||||
while ((command | getline output) > 0) {
|
while ((command | getline output) > 0) {
|
||||||
split(output,field," ");
|
split(output,field," ");
|
||||||
match(field[2],"trn.M?");
|
sub("_"," ",field[2]);
|
||||||
trna=substr(field[2],RSTART,RLENGTH);
|
split(field[2],f2," ");
|
||||||
n[trna]+=field[5];
|
trna=f2[1];
|
||||||
|
ac=f2[2];
|
||||||
|
res[ac][trna]=field[3];
|
||||||
}
|
}
|
||||||
close(command)
|
close(command)
|
||||||
|
|
||||||
nmax=0;
|
i=0;
|
||||||
for (i in n) {
|
for (ac in res) {
|
||||||
dist=n[i];
|
max=0;
|
||||||
if (n[i] > nmax) {
|
for (trna in res[ac]) {
|
||||||
nmax=n[i];
|
s=res[ac][trna]
|
||||||
trna=i;
|
if (s > max) {
|
||||||
}
|
max=s
|
||||||
|
tmax=trna
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
maxi[tmax][ac]=1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
score["trnfM"]=0;
|
||||||
|
score["trnM"]=0;
|
||||||
|
score["trnI"]=0;
|
||||||
|
|
||||||
|
for (trna in maxi) {
|
||||||
|
score[trna]=length(maxi[trna])
|
||||||
|
}
|
||||||
|
|
||||||
|
scores="alternative CAU scores :"
|
||||||
|
max=0
|
||||||
|
for (trna in score) {
|
||||||
|
if (score[trna] > max) {
|
||||||
|
max=score[trna];
|
||||||
|
tmax=trna;
|
||||||
|
}
|
||||||
|
scores=scores" "trna"=" score[trna];
|
||||||
|
}
|
||||||
|
trna=tmax
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
trna="trn" AA1[substr(trna,6,3)];
|
trna="trn" AA1[substr(trna,6,3)];
|
||||||
|
scores="-"
|
||||||
}
|
}
|
||||||
|
|
||||||
return trna;
|
|
||||||
|
resultat=trna"@"scores
|
||||||
|
|
||||||
|
return resultat;
|
||||||
}
|
}
|
||||||
|
|
||||||
function gene2product(gene) {
|
function gene2product(gene) {
|
||||||
return "tRNA-" AA3[substr(gene,4,1)];
|
return "tRNA-" AA3[substr(gene,4,1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
function emblTRNA(geneid,trna,loc,anti,intron,seq) {
|
function emblTRNA(geneid,trna,loc,anti,intron,notes,seq) {
|
||||||
if (loc ~ /^c/) {
|
if (loc ~ /^c/) {
|
||||||
complement=1;
|
complement=1;
|
||||||
match(loc,",[0-9][0-9]*\\]");
|
match(loc,",[0-9][0-9]*\\]");
|
||||||
@ -132,6 +168,9 @@ function emblTRNA(geneid,trna,loc,anti,intron,seq) {
|
|||||||
print "FT /gene=\""trna"\"";
|
print "FT /gene=\""trna"\"";
|
||||||
print "FT /anticodon=\""anti"\"";
|
print "FT /anticodon=\""anti"\"";
|
||||||
print "FT /product=\""product"("anti")\"";
|
print "FT /product=\""product"("anti")\"";
|
||||||
|
print "FT /inference=\"Aragorn-1.2.38\"";
|
||||||
|
if (notes!="-")
|
||||||
|
print "FT /note=\""notes"\"";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,9 +278,12 @@ BEGIN {
|
|||||||
|
|
||||||
((geneid != "") && /^[0-9]+/ && ! /genes found/) \
|
((geneid != "") && /^[0-9]+/ && ! /genes found/) \
|
||||||
{ seq=epissage(intron,seq);
|
{ seq=epissage(intron,seq);
|
||||||
trna=patchtRNA(anti,trna,seq);
|
|
||||||
|
xxx=patchtRNA(anti,trna,seq)
|
||||||
|
split(xxx,trnadata,"@");
|
||||||
|
|
||||||
# print geneid,trna,loc,anti,"'"intron"'",seq;
|
# print geneid,trna,loc,anti,"'"intron"'",seq;
|
||||||
emblTRNA(geneid,trna,loc,anti,intron,seq);
|
emblTRNA(geneid,trnadata[1],loc,anti,intron,trnadata[2],seq);
|
||||||
seq=""
|
seq=""
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,7 +305,10 @@ BEGIN {
|
|||||||
}
|
}
|
||||||
|
|
||||||
END { seq=epissage(intron,seq);
|
END { seq=epissage(intron,seq);
|
||||||
trna=patchtRNA(anti,trna,seq);
|
|
||||||
|
xxx=patchtRNA(anti,trna,seq)
|
||||||
|
split(xxx,trnadata,"@");
|
||||||
|
|
||||||
# print geneid,trna,loc,anti,"'"intron"'",seq;
|
# print geneid,trna,loc,anti,"'"intron"'",seq;
|
||||||
emblTRNA(geneid,trna,loc,anti,intron,seq);
|
emblTRNA(geneid,trnadata[1],loc,anti,intron,trnadata[2],seq);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user