Commit 1a4582bc authored by Amine  GHOZLANE's avatar Amine GHOZLANE

Remove deprecated warning and debug short length reads

parent 18103127
Pipeline #40424 passed with stage
in 6 minutes and 16 seconds
......@@ -2,6 +2,7 @@
BINDIR="$PREFIX/bin"
echo "$BINDIR"
cd $SRC_DIR/src/
javac AlienTrimmer.java
./JarMaker.sh
mv AlienTrimmer.jar $BINDIR/
echo -e "#!/bin/bash\nSCRIPTPATH=\$(dirname \"\${BASH_SOURCE[0]}\")\njava -jar \$SCRIPTPATH/AlienTrimmer.jar \$@" > $BINDIR/AlienTrimmer
......
......@@ -509,7 +509,7 @@ public class AlienTrimmer {
case 'A': lptn |= B1; break; case 'C': iptn |= B1; lptn |= B2; break;
case 'G': iptn |= B2; lptn |= B4; break; case 'T': iptn |= B3; lptn |= B8; break;
}
bsfkmer.set((iptn &= imsk)); lts.add( new Long((lptn &= lmsk)) );
bsfkmer.set((iptn &= imsk)); lts.add( Long.valueOf((lptn &= lmsk)) );
}
}
lfkmer = new long[(lfkmerLgt=(o=lts.size()))]; while ( --o >= 0 ) lfkmer[o] = lts.pollLast().longValue();
......@@ -532,11 +532,11 @@ public class AlienTrimmer {
//## displaying info ##
if ( ++pcpt % 1000000 == 0 )
System.out.println("[" + String.format(Locale.US, "%02d", new Long((cur=(System.currentTimeMillis()-t)/1000)/60))
System.out.println("[" + String.format(Locale.US, "%02d", Long.valueOf((cur=(System.currentTimeMillis()-t)/1000)/60))
+ ":" + (line="0"+(cur%60)).substring(line.length()-2) + "]"
+ String.format(Locale.US, "%,12d", new Integer(pcpt)) + " reads processed:"
+ String.format(Locale.US, "%,12d", new Integer(ftcpt)) + " trimmed"
+ String.format(Locale.US, "%,12d", new Integer(frcpt)) + " removed");
+ String.format(Locale.US, "%,12d", Integer.valueOf(pcpt)) + " reads processed:"
+ String.format(Locale.US, "%,12d", Integer.valueOf(ftcpt)) + " trimmed"
+ String.format(Locale.US, "%,12d", Integer.valueOf(frcpt)) + " removed");
//## matching k-mers... ##
if ( (lgt=(short)fseq.length()) < minLgt ) { ++frcpt; continue; } // too small read
if ( lgt >= score.length ) { score = new byte[++lgt]; --lgt; } else Arrays.fill(score, B0);
......@@ -696,11 +696,11 @@ public class AlienTrimmer {
System.out.println(""); System.out.println("");
}
fout.close();
System.out.println("[" + String.format(Locale.US, "%02d", new Long((cur=(System.currentTimeMillis()-t)/1000)/60))
System.out.println("[" + String.format(Locale.US, "%02d", Long.valueOf((cur=(System.currentTimeMillis()-t)/1000)/60))
+ ":" + (line="0"+(cur%60)).substring(line.length()-2) + "]"
+ String.format(Locale.US, "%,12d", new Integer(pcpt)) + " reads processed:"
+ String.format(Locale.US, "%,12d", new Integer(ftcpt)) + " trimmed"
+ String.format(Locale.US, "%,12d", new Integer(frcpt)) + " removed");
+ String.format(Locale.US, "%,12d", Integer.valueOf(pcpt)) + " reads processed:"
+ String.format(Locale.US, "%,12d", Integer.valueOf(ftcpt)) + " trimmed"
+ String.format(Locale.US, "%,12d", Integer.valueOf(frcpt)) + " removed");
}
......@@ -836,7 +836,7 @@ public class AlienTrimmer {
case 'A': lptn |= B1; break; case 'C': iptn |= B1; lptn |= B2; break;
case 'G': iptn |= B2; lptn |= B4; break; case 'T': iptn |= B3; lptn |= B8; break;
}
bsfkmer.set((iptn &= imsk)); lts.add( new Long((lptn &= lmsk)) );
bsfkmer.set((iptn &= imsk)); lts.add( Long.valueOf((lptn &= lmsk)) );
}
}
lfkmer = new long[(lfkmerLgt=(o=lts.size()))]; while ( --o >= 0 ) lfkmer[o] = lts.pollLast().longValue();
......@@ -965,7 +965,7 @@ public class AlienTrimmer {
case 'A': lptn |= B1; break; case 'C': iptn |= B1; lptn |= B2; break;
case 'G': iptn |= B2; lptn |= B4; break; case 'T': iptn |= B3; lptn |= B8; break;
}
bsrkmer.set((iptn &= imsk)); lts.add( new Long((lptn &= lmsk)) );
bsrkmer.set((iptn &= imsk)); lts.add( Long.valueOf((lptn &= lmsk)) );
}
}
lrkmer = new long[(lrkmerLgt=(o=lts.size()))]; while ( --o >= 0 ) lrkmer[o] = lts.pollLast().longValue();
......@@ -997,15 +997,15 @@ public class AlienTrimmer {
//## displaying info ##
if ( ++pcpt % 1000000 == 0 )
System.out.println("[" + String.format(Locale.US, "%02d", new Long((cur=(System.currentTimeMillis()-t)/1000)/60))
System.out.println("[" + String.format(Locale.US, "%02d", Long.valueOf((cur=(System.currentTimeMillis()-t)/1000)/60))
+ ":" + (line="0"+(cur%60)).substring(line.length()-2) + "]"
+ String.format(Locale.US, "%,12d", new Integer(pcpt)) + " read pairs processed:"
+ String.format(Locale.US, "%,12d", new Integer(ftcpt+rtcpt)) + " trimmed"
+ " (fwd:" + String.format(Locale.US, "%,12d", new Integer(ftcpt))
+ " rev:" + String.format(Locale.US, "%,12d", new Integer(rtcpt)) + ")"
+ String.format(Locale.US, "%,12d", new Integer(frcpt+rrcpt)) + " removed"
+ " (fwd:" + String.format(Locale.US, "%,12d", new Integer(frcpt))
+ " rev:" + String.format(Locale.US, "%,12d", new Integer(rrcpt)) + ")");
+ String.format(Locale.US, "%,12d", Integer.valueOf(pcpt)) + " read pairs processed:"
+ String.format(Locale.US, "%,12d", Integer.valueOf(ftcpt+rtcpt)) + " trimmed"
+ " (fwd:" + String.format(Locale.US, "%,12d", Integer.valueOf(ftcpt))
+ " rev:" + String.format(Locale.US, "%,12d", Integer.valueOf(rtcpt)) + ")"
+ String.format(Locale.US, "%,12d", Integer.valueOf(frcpt+rrcpt)) + " removed"
+ " (fwd:" + String.format(Locale.US, "%,12d", Integer.valueOf(frcpt))
+ " rev:" + String.format(Locale.US, "%,12d", Integer.valueOf(rrcpt)) + ")");
//## matching k-mers (fwd) ##
if ( (lgt=(short)fseq.length()) >= score.length ) { score = new byte[++lgt]; --lgt; } else Arrays.fill(score, B0);
......@@ -1067,8 +1067,8 @@ public class AlienTrimmer {
}
else {
//## ... with no degenerate nucleotide ##
while ( ++j < k_1 ) {
iptn <<= B2;
while ( ++j < k_1 && ++j < fseq.length()) {
iptn <<= B2;
switch ( fseq.charAt(j) ) { case 'C': case 'c': iptn |= B1; break; case 'G': case 'g': iptn |= B2; break; case 'T': case 't': iptn |= B3; break; }
}
while ( j < lgt ) {
......@@ -1280,15 +1280,15 @@ public class AlienTrimmer {
}
}
fout.close(); rout.close(); sout.close();
System.out.println("[" + String.format(Locale.US, "%02d", new Long((cur=(System.currentTimeMillis()-t)/1000)/60))
System.out.println("[" + String.format(Locale.US, "%02d", Long.valueOf((cur=(System.currentTimeMillis()-t)/1000)/60))
+ ":" + (line="0"+(cur%60)).substring(line.length()-2) + "]"
+ String.format(Locale.US, "%,12d", new Integer(pcpt)) + " read pairs processed:"
+ String.format(Locale.US, "%,12d", new Integer(ftcpt+rtcpt)) + " trimmed"
+ " (fwd:" + String.format(Locale.US, "%,12d", new Integer(ftcpt))
+ " rev:" + String.format(Locale.US, "%,12d", new Integer(rtcpt)) + ")"
+ String.format(Locale.US, "%,12d", new Integer(frcpt+rrcpt)) + " removed"
+ " (fwd:" + String.format(Locale.US, "%,12d", new Integer(frcpt))
+ " rev:" + String.format(Locale.US, "%,12d", new Integer(rrcpt)) + ")");
+ String.format(Locale.US, "%,12d", Integer.valueOf(pcpt)) + " read pairs processed:"
+ String.format(Locale.US, "%,12d", Integer.valueOf(ftcpt+rtcpt)) + " trimmed"
+ " (fwd:" + String.format(Locale.US, "%,12d", Integer.valueOf(ftcpt))
+ " rev:" + String.format(Locale.US, "%,12d", Integer.valueOf(rtcpt)) + ")"
+ String.format(Locale.US, "%,12d", Integer.valueOf(frcpt+rrcpt)) + " removed"
+ " (fwd:" + String.format(Locale.US, "%,12d", Integer.valueOf(frcpt))
+ " rev:" + String.format(Locale.US, "%,12d", Integer.valueOf(rrcpt)) + ")");
}
......
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