127
127
Character delimiter) throws IOException
129
129
Set<String> names1 = getFastqNames(input1, delimiter);
130
System.out.println("First input file contains " + names1.size() + " records");
130
System.err.println("First input file contains " + names1.size() + " records");
132
132
Set<String> names2 = getFastqNames(input2, delimiter);
133
System.out.println("Second input file contains " + names2.size() + " records");
133
System.err.println("Second input file contains " + names2.size() + " records");
135
135
names1.retainAll(names2);
136
System.out.println("Files shared " + names1.size() + " records");
136
System.err.println("Files shared " + names1.size() + " records");
138
138
names2.retainAll(names1);
139
139
if(!equalOrdering(names1,names2))
141
System.out.println("Error: Common records are not in identical order, cowardly refusing to do anything");
141
System.err.println("Error: Common records are not in identical order, cowardly refusing to do anything");
145
System.out.println("Splitting first file");
145
System.err.println("Splitting first file");
146
146
splitFastq(input1, output1P, output1U, names1, delimiter);
148
System.out.println("Splitting second file");
148
System.err.println("Splitting second file");
149
149
splitFastq(input2, output2P, output2U, names1, delimiter);
151
System.out.println("All done");
151
System.err.println("All done");
154
154
public static void main(String[] args) throws IOException
166
166
String delimStr=args[argIndex++];
168
168
if(delimStr.length()!=1)
169
System.out.println("Delimiter must be exactly one character, got '"+delimStr+"'");
169
System.err.println("Delimiter must be exactly one character, got '"+delimStr+"'");
171
171
delim=delimStr.charAt(0);
175
System.out.println("Unknown option " + arg);
175
System.err.println("Unknown option " + arg);
176
176
badOption = true;
180
180
if (args.length - argIndex < 6 || badOption)
183
183
.println("Usage: Pairomatic [-delim delimChar] <inputFile1> <inputFile2> <outputFile1P> <outputFile1U> <outputFile2P> <outputFile2U>");