code reformatting as required
package io.github.mzmine.modules.dataprocessing.group_metacorrelate.export;
-
import io.github.msdk.MSDKRuntimeException;
import io.github.mzmine.datamodel.RawDataFile;
import io.github.mzmine.datamodel.features.FeatureList;
@@ -41,6 +40,7 @@ import io.github.mzmine.util.SortingDirection;
import io.github.mzmine.util.SortingProperty;
import io.github.mzmine.util.files.FileAndPathUtil;
import io.github.mzmine.util.io.TxtWriter;
+
import java.io.File;
import java.text.DecimalFormat;
import java.text.NumberFormat;
@@ -58,7 +58,9 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
+
import javafx.collections.ObservableList;
+
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -176,15 +178,13 @@ public class ExportCorrAnnotationTask extends AbstractTask {
if (added.get() > 0) {
String CString = "{}";
boolean check = filename.getPath().contains(CString);
- if(check)
- {
+ if (check) {
File curFile = filename;
String cleanPlName = featureList.getName().replaceAll("[^a-zA-Z0-9.-]", "_");
String newFilename = filename.getPath().replaceAll(Pattern.quote(CString), cleanPlName);
curFile = new File(newFilename);
writeToFile(ann.toString(), curFile, "_edges_msannotation");
- }
- else {
+ } else {
writeToFile(ann.toString(), filename, "_edges_msannotation");
}
return true;
@@ -244,15 +244,13 @@ public class ExportCorrAnnotationTask extends AbstractTask {
if (added.get() > 0) {
String CString = "{}";
boolean check = filename.getPath().contains(CString);
- if(check)
- {
+ if (check) {
File curFile = filename;
String cleanPlName = pkl.getName().replaceAll("[^a-zA-Z0-9.-]", "_");
String newFilename = filename.getPath().replaceAll(Pattern.quote(CString), cleanPlName);
curFile = new File(newFilename);
writeToFile(ann.toString(), curFile, "_edges_iin_relations");
- }
- else {
+ } else {
writeToFile(ann.toString(), filename, "_edges_iin_relations");
}
return true;
@@ -265,13 +263,11 @@ public class ExportCorrAnnotationTask extends AbstractTask {
}
/**
- * Filters rows by row filter (MS/MS, IIN, ...) and finds the pair with the highest intensity sum
- * to represent the relationship between the two {@link IonNetwork}
+ * Filters rows by row filter (MS/MS, IIN, ...) and finds the pair with the highest intensity sum to represent the relationship between the two {@link IonNetwork}
*
* @param netA network a
* @param netB network netB
- * @return an array[2] of the representative rows for netA and netB or null if there was no
- * relationship or no pair of rows matching the filter
+ * @return an array[2] of the representative rows for netA and netB or null if there was no relationship or no pair of rows matching the filter
*/
@Nullable
private FeatureListRow[] getBestRelatedRows(IonNetwork netA, IonNetwork netB) {
@@ -366,8 +362,7 @@ public class ExportCorrAnnotationTask extends AbstractTask {
*
* @param data the data to be exported
* @param filename the filename
- * @param suffix the suffix that is added to the filename (only used if no allInOneFile is
- * false)
+ * @param suffix the suffix that is added to the filename (only used if no allInOneFile is false)
*/
private void writeToFile(String data, File filename, String suffix) {
File realFile = FileAndPathUtil.eraseFormat(filename);
