From 6e1c554beb3dbceec93958a2bbabbd94dad706dc Mon Sep 17 00:00:00 2001 From: LeonardoGonzales Date: Mon, 9 Dec 2024 10:59:14 +0000 Subject: [PATCH] improve fasta details --- .../core/parser/fasta/uniparc/UniParcFastaParser.java | 10 ++-------- .../xml/uniparc/UniParcDBCrossReferenceConverter.java | 10 ---------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/core-parser/src/main/java/org/uniprot/core/parser/fasta/uniparc/UniParcFastaParser.java b/core-parser/src/main/java/org/uniprot/core/parser/fasta/uniparc/UniParcFastaParser.java index 5bd0e2f06..7b375c6d5 100644 --- a/core-parser/src/main/java/org/uniprot/core/parser/fasta/uniparc/UniParcFastaParser.java +++ b/core-parser/src/main/java/org/uniprot/core/parser/fasta/uniparc/UniParcFastaParser.java @@ -5,6 +5,7 @@ import org.uniprot.core.uniparc.UniParcEntry; import org.uniprot.core.uniparc.UniParcEntryLight; +import static org.uniprot.core.parser.fasta.FastaUtils.*; import static org.uniprot.core.uniparc.impl.UniParcEntryLightBuilder.HAS_ACTIVE_CROSS_REF; /** @@ -40,14 +41,7 @@ private static String getFastaString(String entry, String status, Sequence seque sb.append(">").append(entry).append(" "); sb.append("status=").append(status); sb.append("\n"); - int columnCounter = 0; - for (char c : sequence.getValue().toCharArray()) { - if (columnCounter % 60 == 0 && columnCounter > 0) { - sb.append("\n"); - } - sb.append(c); - columnCounter++; - } + sb.append(parseSequence(sequence.getValue())); return sb.toString(); } } diff --git a/xml-parser/src/main/java/org/uniprot/core/xml/uniparc/UniParcDBCrossReferenceConverter.java b/xml-parser/src/main/java/org/uniprot/core/xml/uniparc/UniParcDBCrossReferenceConverter.java index 4da7e0502..381caa0c1 100644 --- a/xml-parser/src/main/java/org/uniprot/core/xml/uniparc/UniParcDBCrossReferenceConverter.java +++ b/xml-parser/src/main/java/org/uniprot/core/xml/uniparc/UniParcDBCrossReferenceConverter.java @@ -23,16 +23,6 @@ */ public class UniParcDBCrossReferenceConverter implements Converter { - - public static final String PROPERTY_GENE_NAME = "gene_name"; - public static final String PROPERTY_PROTEIN_NAME = "protein_name"; - public static final String PROPERTY_CHAIN = "chain"; - public static final String PROPERTY_NCBI_GI = "NCBI_GI"; - public static final String PROPERTY_PROTEOME_ID = "proteome_id"; - public static final String PROPERTY_COMPONENT = "component"; - public static final String PROPERTY_NCBI_TAXONOMY_ID = "NCBI_taxonomy_id"; - public static final String PROPERTY_UNIPROTKB_ACCESSION = "UniProtKB_accession"; - private final ObjectFactory xmlFactory; private final TaxonomyRepo taxonomyRepo;