Package au.org.intersect.samifier.domain

Examples of au.org.intersect.samifier.domain.SAMEntry


            }

            if (DebuggingFlag.get_use_mascot_score_flag() == 1) {
                int mapq = result.getConfidenceScore()
                        .round(new MathContext(0)).intValue();
                samEntries.add(new SAMEntry(resultName, peptide.getGeneInfo(),
                        peptideStart, peptide.getCigarString(), peptide
                                .getNucleotideSequence(), mapq));
            } else {
                int mapq = result.getConfidenceScore().round(new MathContext(0)).intValue();
                String sequnece = peptide.getNucleotideSequence();
                String outputSequence = (peptide.getGeneInfo().getDirection() == -1) ? new StringBuilder(StringUtils.replaceChars(sequnece, "ACGT", "TGCA")).reverse().toString() : sequnece;
                SAMEntry entry = new SAMEntry(resultName, peptide.getGeneInfo(), peptideStart, peptide.getCigarString(), outputSequence, mapq);
                entry.setChromosomeLength(sequenceGenerator.getFastaParser().getChromosomeLength(peptide.getGeneInfo().getChromosome()));
                samEntries.add(entry);
            }

            try {
                if (DebuggingFlag.get_sbi_debug_flag() == 1) {
                    CodonTranslationTable translationTable = CodonTranslationTable
                            .parseTableFile(translationTableFile);
                    String nucleotideString = peptide.getNucleotideSequence();
                    int direction = peptide.getGeneInfo().getDirection();
                    String mascotPeptideString = result.getPeptideSequence();
                    String predictedAminoAcidSequence = new String("");

                    if (direction != 1) {
                        StringBuilder invertedReversedSequence = new StringBuilder(
                                StringUtils.replaceChars(nucleotideString,
                                        "ACGT", "TGCA")).reverse();
                        predictedAminoAcidSequence = translationTable
                                .proteinToAminoAcidSequence(invertedReversedSequence
                                        .toString());
                    } else {
                        predictedAminoAcidSequence = translationTable
                                .proteinToAminoAcidSequence(nucleotideString);
                    }

                    if (!predictedAminoAcidSequence.equals(mascotPeptideString)) {
                        String samEntryStrng = new SAMEntry(resultName,
                                peptide.getGeneInfo(), peptideStart,
                                peptide.getCigarString(),
                                peptide.getNucleotideSequence()).toString();

                        LOG.info("Incorrect nucleotide sequence for following SAM entry:\n"
View Full Code Here

TOP

Related Classes of au.org.intersect.samifier.domain.SAMEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.