Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GIPhy
SAM2MSA
Commits
e9258760
Commit
e9258760
authored
Jul 12, 2020
by
Alexis CRISCUOLO
⚫
Browse files
0.2.2.1
parent
e2574715
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/MAP2FASTA.java
View file @
e9258760
...
...
@@ -35,7 +35,7 @@ import java.util.*;
public
class
MAP2FASTA
{
//### constants ################################################################
final
static
String
VERSION
=
"0.
1
.20071
1
c"
;
final
static
String
VERSION
=
"0.
2
.20071
2a
c"
;
final
static
String
NOTHING
=
"N.o./.T.h.I.n.G"
;
final
static
String
STDIN
=
"-"
;
final
static
int
MIN_COV
=
10
;
// default minimum coverage
...
...
@@ -216,7 +216,8 @@ public class MAP2FASTA {
basename
=
mapFile
.
getName
();
if
(
(
x
=
basename
.
lastIndexOf
(
"."
))
<=
0
)
{
System
.
err
.
println
(
"incorrect MAP file name (option -i)"
);
System
.
exit
(
1
);
}
if
(
!
basename
.
substring
(
x
).
equals
(
".map"
)
)
{
System
.
err
.
println
(
"MAP file does not end with .map (option -i)"
);
System
.
exit
(
1
);
}
basename
=
mapFile
.
getParent
()
+
File
.
separatorChar
+
basename
.
substring
(
0
,
x
);
basename
=
basename
.
substring
(
0
,
x
);
if
(
mapFile
.
getParent
()
!=
null
)
basename
=
mapFile
.
getParent
()
+
File
.
separatorChar
+
basename
;
//### testing numerical options
if
(
bfreq
<=
0
||
bfreq
>=
1
)
{
System
.
err
.
println
(
"incorrect proportion value: "
+
bfreq
+
" (option -f)"
);
System
.
exit
(
1
);
}
if
(
minS
<
1
)
{
System
.
err
.
println
(
"incorrect positive value: "
+
minS
+
" (option -s)"
);
System
.
exit
(
1
);
}
...
...
@@ -1003,7 +1004,7 @@ public class MAP2FASTA {
out
.
newLine
();
}
z
=
0
;
u
=(--
x
);
while
(
++
x
<
distrib
.
length
)
z
+=
distrib
[
x
];
out
.
write
((
">"
+
u
+
BLANK
).
substring
(
0
,
5
)
+
" "
);
out
.
write
((
">"
+
u
+
BLANK
).
substring
(
0
,
5
)
+
"
"
);
y
=
-
1
;
while
(
++
y
<=
z
*
scale
/
sumy
)
out
.
write
(
"="
);
y
-=
2
;
while
(
++
y
<=
depth
)
out
.
write
(
" "
);
out
.
write
(
""
+
z
);
out
.
newLine
();
out
.
close
();
...
...
src/SAM2MAP.java
View file @
e9258760
...
...
@@ -35,7 +35,7 @@ import java.util.*;
public
class
SAM2MAP
{
//### constants ################################################################
final
static
String
VERSION
=
"0.
1
.20071
1
c"
;
final
static
String
VERSION
=
"0.
2
.20071
2
c"
;
final
static
String
NOTHING
=
"N.o./.T.h.I.n.G"
;
final
static
String
STDIN
=
"-"
;
final
static
int
MIN_COV
=
10
;
// default minimum coverage
...
...
@@ -403,9 +403,11 @@ public class SAM2MAP {
}
}
}
/*
pos = -1;
while ( ++pos < lref )
if
(
oi
[
pos
]
>
0
)
System
.
out
.
println
(
"WARNING: "
+
oi
[
pos
]
+
" aligned reads with insertion to the reference at position "
+
(
pos
+
1
));
if ( oi[pos] > 5 ) System.out.println("WARNING: " + oi[pos] + " aligned reads with insertion to the reference at position " + (pos+1));
*/
//##########################################################################################################
...
...
@@ -1092,7 +1094,7 @@ public class SAM2MAP {
out
.
newLine
();
}
z
=
0
;
u
=(--
x
);
while
(
++
x
<
distrib
.
length
)
z
+=
distrib
[
x
];
out
.
write
((
">"
+
u
+
BLANK
).
substring
(
0
,
5
)
+
" "
);
out
.
write
((
">"
+
u
+
BLANK
).
substring
(
0
,
5
)
+
"
"
);
y
=
-
1
;
while
(
++
y
<=
z
*
scale
/
sumy
)
out
.
write
(
"="
);
y
-=
2
;
while
(
++
y
<=
depth
)
out
.
write
(
" "
);
out
.
write
(
""
+
z
);
out
.
newLine
();
out
.
close
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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