From b051e6860b3076311ce3c06d5fe01d5eeee5e53d Mon Sep 17 00:00:00 2001 From: cschlaffner Date: Thu, 16 Jan 2020 14:02:54 -0500 Subject: [PATCH] minor update change to fasta gene and transcript ID extraction --- PoGo/src/Globals.cpp | 4 ++-- PoGo/src/ProteinEntry.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PoGo/src/Globals.cpp b/PoGo/src/Globals.cpp index d320da9..ce65261 100644 --- a/PoGo/src/Globals.cpp +++ b/PoGo/src/Globals.cpp @@ -9,6 +9,6 @@ bool GENOME_MAPPER_GLOBALS::PEPTIDE_MAPPER::CHR_FROM_GENOME_FASTA(false); std::string GENOME_MAPPER_GLOBALS::ID::GTF_GENE_ID("gene_id \""); std::string GENOME_MAPPER_GLOBALS::ID::GTF_TRANSCRIPT_ID("transcript_id \""); std::string GENOME_MAPPER_GLOBALS::ID::GTF_EXON_ID("exon_id \""); -std::string GENOME_MAPPER_GLOBALS::ID::FASTA_GENE_ID("gene:"); -std::string GENOME_MAPPER_GLOBALS::ID::FASTA_TRANSCRIPT_ID("transcript:"); +std::string GENOME_MAPPER_GLOBALS::ID::FASTA_GENE_ID("gene"); +std::string GENOME_MAPPER_GLOBALS::ID::FASTA_TRANSCRIPT_ID("transcript"); bool GENOME_MAPPER_GLOBALS::ID::ID_VERSION_INCLUDE(false); diff --git a/PoGo/src/ProteinEntry.cpp b/PoGo/src/ProteinEntry.cpp index a562c8f..5748f4f 100644 --- a/PoGo/src/ProteinEntry.cpp +++ b/PoGo/src/ProteinEntry.cpp @@ -31,7 +31,7 @@ std::string ProteinEntry::extract_transcript_id_fasta(std::string str, bool vers size_t index = str.find(GENOME_MAPPER_GLOBALS::ID::FASTA_TRANSCRIPT_ID); std::string value(""); if (index != std::string::npos) { - index = index + GENOME_MAPPER_GLOBALS::ID::FASTA_TRANSCRIPT_ID.length(); + index = index + GENOME_MAPPER_GLOBALS::ID::FASTA_TRANSCRIPT_ID.length() + 1; } else { index = 1; } @@ -48,7 +48,7 @@ std::string ProteinEntry::extract_gene_id_fasta(std::string str, bool versioninc size_t index = str.find(GENOME_MAPPER_GLOBALS::ID::FASTA_GENE_ID); std::string value(""); if (index != std::string::npos) { - index = index + GENOME_MAPPER_GLOBALS::ID::FASTA_GENE_ID.length(); + index = index + GENOME_MAPPER_GLOBALS::ID::FASTA_GENE_ID.length() + 1; } else { index = str.find_first_of("|"); index = index + 1;