forked from alexdobin/STAR
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a bug with genome generation for annotations without spliece ju…
…nctions.
- Loading branch information
Showing
8 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
BEGIN { | ||
OFS="\t"; | ||
mapqU=255; | ||
} | ||
{ | ||
if (substr($1,1,1)!="@") { | ||
|
||
m=and($2,0x80)/0x80+1; | ||
|
||
if ($1!=readNameOld) delete readSJs; | ||
readNameOld=$1; | ||
|
||
n=split($6,L,/[A-Z]/)-1; | ||
split($6,C,/[0-9]*/); | ||
t=1;g=$4; | ||
for (k=1;k<=n;k++) {#scan through CIGAR operations | ||
if (C[k+1]=="S" || C[k+1]=="I") { | ||
t+=L[k]; | ||
} else if (C[k+1]=="D") { | ||
g+=L[k]; | ||
} else if (C[k+1]=="N") { | ||
sj1=$3 "\t" g "\t" g+L[k]-1; | ||
readSJs[sj1]++; | ||
|
||
if (readSJs[sj1]==1) {#only count this junction if it has nto been counted for the same read | ||
SJ[sj1]=1; | ||
if ($5>=mapqU) { | ||
SJu[sj1]++; | ||
} else { | ||
SJm[sj1]++; | ||
}; | ||
}; | ||
|
||
if ($5>=mapqU) { | ||
SJu1[sj1]++; | ||
} else { | ||
SJm1[sj1]++; | ||
}; | ||
|
||
g+=L[k]; | ||
|
||
} else { # M operation | ||
g+=L[k]; | ||
t+=L[k]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
END { | ||
|
||
for (ii in SJ) { | ||
print ii, SJu[ii]+0, SJm[ii]+0, SJu1[ii]+0, SJm1[ii]+0; | ||
}; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters