Package au.org.intersect.samifier.domain

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


                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,
View Full Code Here


                genome, proteinToOLNMap, chromosomeDir);

        FileWriter output = new FileWriter(outputFile);

        if (DebuggingFlag.get_sbi_debug_flag() == 1) {
            CodonTranslationTable translationTable = CodonTranslationTable
                    .parseTableFile(translationTableFile);

            for (PeptideSearchResult peptideSearchResult : peptideSearchResults) {
                PeptideSequence peptideSequence = sequenceGenerator
                        .getPeptideSequence(peptideSearchResult);
View Full Code Here

            if (peptideSequence == null || peptideSequence.getNucleotideSequence().isEmpty()) {
                LOG.warn("Error while geting peptide sequnce for " + peptideSearchResult.getId());
                continue;
            }
            if (DebuggingFlag.get_sbi_debug_flag() == 1) {
                CodonTranslationTable translationTable = CodonTranslationTable
                        .parseTableFile(translationTableFile);
                ResultsAnalyserOutputter outputter = new ResultsAnalyserOutputter(
                        peptideSearchResult, proteinToOLNMap, genome,
                        peptideSequence, translationTable);
                if (outputter.isValid()) {
View Full Code Here

       
    }
    public static void main(String[] args) {
        try {
            File f = new File(args[0]);
            CodonTranslationTable table = CodonTranslationTable
                    .parseTableFile(f);
            // frame
            String protein = args[1];
            if (args.length > 2) {
                int frame = Integer.parseInt(args[2]);
                if (frame > 1) {
                    protein = protein.substring(frame - 1);
                } else if (frame < 0) {
                    protein = (new StringBuilder(protein)).reverse().toString();
                    if (frame < -1) {
                        protein = protein.substring(Math.abs(frame) - 1);
                    }
                    int modulo = protein.length() % GenomeConstant.BASES_PER_CODON;
                    if (modulo != 0) {
                        protein = protein.substring(0, protein.length()
                                - modulo);
                    }
                    protein = ProteinOutputter
                            .invertNucleotideSequence(protein);
                }
            }
            int modulo = protein.length() % GenomeConstant.BASES_PER_CODON;
            if (modulo != 0) {
                protein = protein.substring(0, protein.length() - modulo);
            }
            System.out.println(table.proteinToAminoAcidSequence(protein));
        } catch (Exception e) {
            System.err.println(e);
            System.exit(1);
        }
    }
View Full Code Here

TOP

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

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.