return exportData;
}
static int exportVisibleAlignments(String outPath, Collection<Track> tracks, ReferenceFrame frame){
AlignmentTrack alignmentTrack = null;
for(Track track: tracks){
if(track instanceof AlignmentTrack){
alignmentTrack = (AlignmentTrack) track;
break;
}
}
if(alignmentTrack == null) return -1;
File outFile = new File(outPath);
try {
AlignmentDataManager dataManager = alignmentTrack.getDataManager();
ResourceLocator inlocator = dataManager.getLocator();
Range range = frame.getCurrentRange();
//Read directly from file
//return SAMWriter.writeAlignmentFilePicard(inlocator, outPath, range.getChr(), range.getStart(), range.getEnd());