Skip to content

Commit

Permalink
Target descriptors in export fields
Browse files Browse the repository at this point in the history
  • Loading branch information
PoslavskySV committed May 25, 2017
1 parent c5b4e81 commit f83de35
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/main/java/com/milaboratory/mixcr/export/FieldExtractors.java
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,26 @@ protected String extract(VDJCAlignments object) {
}
});

descriptorsList.add(new PL_A("-targetDescriptions", "Export target descriptions", "Target descriptions", "targetDescriptions") {
@Override
protected String extract(VDJCAlignments object) {
String[] ds = object.getTargetDescriptions();
if (ds == null || ds.length == 0) {
char[] commas = new char[object.numberOfTargets() - 1];
Arrays.fill(commas, ',');
return new String(commas);
}
StringBuilder sb = new StringBuilder();
for (int i = 0; ; i++) {
sb.append(ds[i]);
if (i == ds.length - 1)
break;
sb.append(',');
}
return sb.toString();
}
});

descriptorsList.add(alignmentsToClone("-cloneId", "To which clone alignment was attached.", false));
descriptorsList.add(alignmentsToClone("-cloneIdWithMappingType", "To which clone alignment was attached with additional info on mapping type.", true));
descriptorsList.add(new AbstractField<Clone>(Clone.class, "-readIds", "Read IDs aggregated by clone.") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ public void writeReport(ReportHelper helper) {
/**
* @return result or null is something went wrong
*/

static VDJCAlignments transform(VDJCAlignments input,
Extender transformer) {

Expand Down

0 comments on commit f83de35

Please sign in to comment.