Commit e9258760 authored by Alexis  CRISCUOLO's avatar Alexis CRISCUOLO

0.2.2.1

parent e2574715
......@@ -35,7 +35,7 @@ import java.util.*;
public class MAP2FASTA {
//### constants ################################################################
final static String VERSION = "0.1.200711c";
final static String VERSION = "0.2.200712ac";
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();
......
......@@ -35,7 +35,7 @@ import java.util.*;
public class SAM2MAP {
//### constants ################################################################
final static String VERSION = "0.1.200711c";
final static String VERSION = "0.2.200712c";
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment