public RNACompoundSet() { addNucleotideCompound("A", "U"); addNucleotideCompound("U", "A"); addNucleotideCompound("G", "C"); addNucleotideCompound("C", "G"); addNucleotideCompound("N", "N"); addNucleotideCompound("-", "-"); }
/** * Create a RNA aequence from a proxy reader * @param proxyLoader */ public RNASequence(ProxySequenceReader<NucleotideCompound> proxyLoader) { super(proxyLoader, RNACompoundSet.getRNACompoundSet()); }
/** * Create a RNA sequence from a String * @param seqString * @throws CompoundNotFoundException */ public RNASequence(String seqString) throws CompoundNotFoundException { super(seqString, RNACompoundSet.getRNACompoundSet()); }
public RNACompoundSet() { addNucleotideCompound("A", "U"); addNucleotideCompound("U", "A"); addNucleotideCompound("G", "C"); addNucleotideCompound("C", "G"); addNucleotideCompound("N", "N"); addNucleotideCompound("-", "-"); }
/** * Create a RNA aequence from a proxy reader * @param proxyLoader */ public RNASequence(ProxySequenceReader<NucleotideCompound> proxyLoader) { super(proxyLoader, RNACompoundSet.getRNACompoundSet()); }
/** * Create a RNA sequence from a String * @param seqString * @throws CompoundNotFoundException */ public RNASequence(String seqString) throws CompoundNotFoundException { super(seqString, RNACompoundSet.getRNACompoundSet()); }
public RnaSequenceView(Sequence<NucleotideCompound> sourceDna) { this(sourceDna, RNACompoundSet.getRNACompoundSet()); }
public RnaSequenceView(Sequence<NucleotideCompound> sourceDna) { this(sourceDna, RNACompoundSet.getRNACompoundSet()); }
/** * Determines GCG type * @param cs compound set of sequences * @return GCG type */ public static <C extends Compound> String getGCGType(CompoundSet<C> cs) { return (cs == DNACompoundSet.getDNACompoundSet() || cs == AmbiguityDNACompoundSet.getDNACompoundSet()) ? "D" : (cs == RNACompoundSet.getRNACompoundSet() || cs == AmbiguityRNACompoundSet.getRNACompoundSet()) ? "R" : "P"; }
/** * Determines GCG type * @param cs compound set of sequences * @return GCG type */ public static <C extends Compound> String getGCGType(CompoundSet<C> cs) { return (cs == DNACompoundSet.getDNACompoundSet() || cs == AmbiguityDNACompoundSet.getDNACompoundSet()) ? "D" : (cs == RNACompoundSet.getRNACompoundSet() || cs == AmbiguityRNACompoundSet.getRNACompoundSet()) ? "R" : "P"; }
if (type != null) { if (type.contains("RNA")) { compoundType = RNACompoundSet.getRNACompoundSet(); } else { compoundType = DNACompoundSet.getDNACompoundSet();
if (type != null) { if (type.contains("RNA")) { compoundType = RNACompoundSet.getRNACompoundSet(); } else { compoundType = DNACompoundSet.getDNACompoundSet();
/** * Read a fasta RNA sequence * @param inStream * @return * @throws IOException */ public static LinkedHashMap<String, RNASequence> readFastaRNASequence( InputStream inStream) throws IOException { FastaReader<RNASequence, NucleotideCompound> fastaReader = new FastaReader<RNASequence, NucleotideCompound>( inStream, new GenericFastaHeaderParser<RNASequence, NucleotideCompound>(), new RNASequenceCreator(RNACompoundSet.getRNACompoundSet())); return fastaReader.process(); }
/** * Read a Genbank RNA sequence * @param inStream * @return * @throws Exception */ public static LinkedHashMap<String, RNASequence> readGenbankRNASequence( InputStream inStream) throws Exception { GenbankReader<RNASequence, NucleotideCompound> GenbankReader = new GenbankReader<RNASequence, NucleotideCompound>( inStream, new GenericGenbankHeaderParser<RNASequence, NucleotideCompound>(), new RNASequenceCreator(RNACompoundSet.getRNACompoundSet())); return GenbankReader.process(); }
/** * Read a fasta RNA sequence * @param inStream * @return * @throws IOException */ public static LinkedHashMap<String, RNASequence> readFastaRNASequence( InputStream inStream) throws IOException { FastaReader<RNASequence, NucleotideCompound> fastaReader = new FastaReader<RNASequence, NucleotideCompound>( inStream, new GenericFastaHeaderParser<RNASequence, NucleotideCompound>(), new RNASequenceCreator(RNACompoundSet.getRNACompoundSet())); return fastaReader.process(); }
/** * Read a Genbank RNA sequence * @param inStream * @return * @throws Exception */ public static LinkedHashMap<String, RNASequence> readGenbankRNASequence( InputStream inStream) throws Exception { GenbankReader<RNASequence, NucleotideCompound> GenbankReader = new GenbankReader<RNASequence, NucleotideCompound>( inStream, new GenericGenbankHeaderParser<RNASequence, NucleotideCompound>(), new RNASequenceCreator(RNACompoundSet.getRNACompoundSet())); return GenbankReader.process(); }
/** * Selecting lazySequenceLoad=true will parse the Genbank file and figure out the accessionid and offsets and return sequence objects * that can in the future read the sequence from the disk. This allows the loading of large Genbank files where you are only interested * in one sequence based on accession id. * @param file * @param lazySequenceLoad * @return * @throws Exception */ public static LinkedHashMap<String, RNASequence> readGenbankRNASequence(File file, boolean lazySequenceLoad) throws Exception { if (!lazySequenceLoad) { return readGenbankRNASequence(file); } GenbankReader<RNASequence, NucleotideCompound> GenbankProxyReader = new GenbankReader<RNASequence, NucleotideCompound>( file, new GenericGenbankHeaderParser<RNASequence, NucleotideCompound>(), new FileProxyRNASequenceCreator( file, RNACompoundSet.getRNACompoundSet(), new GenbankSequenceParser<AbstractSequence<NucleotideCompound>, NucleotideCompound>() ) ); return GenbankProxyReader.process(); }
/** * Selecting lazySequenceLoad=true will parse the FASTA file and figure out the accessionid and offsets and return sequence objects * that can in the future read the sequence from the disk. This allows the loading of large fasta files where you are only interested * in one sequence based on accession id. * @param file * @param lazySequenceLoad * @return * @throws IOException */ public static LinkedHashMap<String, RNASequence> readFastaRNASequence(File file, boolean lazySequenceLoad) throws IOException { if (!lazySequenceLoad) { return readFastaRNASequence(file); } FastaReader<RNASequence, NucleotideCompound> fastaProxyReader = new FastaReader<RNASequence, NucleotideCompound>( file, new GenericFastaHeaderParser<RNASequence, NucleotideCompound>(), new FileProxyRNASequenceCreator( file, RNACompoundSet.getRNACompoundSet(), new FastaSequenceParser() ) ); return fastaProxyReader.process(); }
/** * Selecting lazySequenceLoad=true will parse the Genbank file and figure out the accessionid and offsets and return sequence objects * that can in the future read the sequence from the disk. This allows the loading of large Genbank files where you are only interested * in one sequence based on accession id. * @param file * @param lazySequenceLoad * @return * @throws Exception */ public static LinkedHashMap<String, RNASequence> readGenbankRNASequence(File file, boolean lazySequenceLoad) throws Exception { if (!lazySequenceLoad) { return readGenbankRNASequence(file); } GenbankReader<RNASequence, NucleotideCompound> GenbankProxyReader = new GenbankReader<RNASequence, NucleotideCompound>( file, new GenericGenbankHeaderParser<RNASequence, NucleotideCompound>(), new FileProxyRNASequenceCreator( file, RNACompoundSet.getRNACompoundSet(), new GenbankSequenceParser<AbstractSequence<NucleotideCompound>, NucleotideCompound>() ) ); return GenbankProxyReader.process(); }
/** * Selecting lazySequenceLoad=true will parse the FASTA file and figure out the accessionid and offsets and return sequence objects * that can in the future read the sequence from the disk. This allows the loading of large fasta files where you are only interested * in one sequence based on accession id. * @param file * @param lazySequenceLoad * @return * @throws IOException */ public static LinkedHashMap<String, RNASequence> readFastaRNASequence(File file, boolean lazySequenceLoad) throws IOException { if (!lazySequenceLoad) { return readFastaRNASequence(file); } FastaReader<RNASequence, NucleotideCompound> fastaProxyReader = new FastaReader<RNASequence, NucleotideCompound>( file, new GenericFastaHeaderParser<RNASequence, NucleotideCompound>(), new FileProxyRNASequenceCreator( file, RNACompoundSet.getRNACompoundSet(), new FastaSequenceParser() ) ); return fastaProxyReader.process(); }