Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
violethaze74
Artemis
Commits
024d1180
Commit
024d1180
authored
Feb 15, 2013
by
tcarver
Browse files
fix SNPs for CRAM
parent
7bc6ee93
Changes
1
Hide whitespace changes
Inline
Side-by-side
uk/ac/sanger/artemis/components/alignment/BamView.java
View file @
024d1180
...
...
@@ -1150,7 +1150,7 @@ public class BamView extends JPanel
* @param pixPerBase
* @param ypos
*/
private
void
drawSequence
(
Graphics2D
g2
,
BamViewRecord
bamViewRecord
,
private
void
drawSequence
(
final
Graphics2D
g2
,
final
BamViewRecord
bamViewRecord
,
int
ypos
,
String
refSeq
,
int
refSeqStart
)
{
SAMRecord
samRecord
=
bamViewRecord
.
sam
;
...
...
@@ -1164,8 +1164,8 @@ public class BamView extends JPanel
int
xpos
;
int
len
=
0
;
int
refPos
=
0
;
String
readSeq
=
samRecord
.
getReadString
();
int
offset
=
getSequenceOffset
(
samRecord
.
getReferenceName
());
final
String
readSeq
=
samRecord
.
getReadString
();
final
int
offset
=
getSequenceOffset
(
samRecord
.
getReferenceName
());
byte
[]
phredQuality
=
null
;
if
(
baseQualityColour
.
isSelected
())
...
...
@@ -1189,7 +1189,7 @@ public class BamView extends JPanel
if
(
isSNPs
&&
refSeq
!=
null
&&
refPos
>
0
&&
refPos
<
refSeq
.
length
())
{
if
(
readSeq
.
charAt
(
readPos
)
!=
refSeq
.
charAt
(
refPos
))
if
(
Character
.
toUpperCase
(
readSeq
.
charAt
(
readPos
)
)
!=
refSeq
.
charAt
(
refPos
))
g2
.
setColor
(
Color
.
red
);
else
g2
.
setColor
(
col
);
...
...
@@ -2229,7 +2229,7 @@ public class BamView extends JPanel
{
int
readPos
=
readStart
-
1
+
j
;
int
refPos
=
refStart
+
j
;
if
(
Character
.
toUpperCase
(
refSeq
[
refPos
-
rbeg
])
!=
readSeq
[
readPos
])
if
(
Character
.
toUpperCase
(
refSeq
[
refPos
-
rbeg
])
!=
Character
.
toUpperCase
(
(
char
)
readSeq
[
readPos
])
)
{
if
(
snps
==
null
)
snps
=
new
ArrayList
<
Integer
>();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment