# Class GprSeq

java.lang.Object
org.snpeff.util.GprSeq

public class GprSeq extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static byte[]`
`AA_TO_CODE`
`static final char[]`
`AMINO_ACIDS`
`static final char[]`
`BASES`
`static char[]`
`CODE_TO_AA`
`static char[]`
`CODE_TO_DNA`
`static byte[]`
`DNA_TO_CODE`
`static final char`
`FASTQ_SANGER_ZERO`
`static final byte`
`GAP_CODE`
`static final String[]`
`KNOWN_FILE_EXTENSIONS`

## Constructor Summary

Constructors
Constructor
Description
`GprSeq()`

## Method Summary

Modifier and Type
Method
Description
`static byte`
`aa2Code(char aa)`
Convert from AA char to code
`static byte[]`
`aa2Code(String aa)`
Convert from AA sequence to codes
`static int`
`aaPairCode(byte aaCode1, byte aaCode2)`
Code an AA-pair
`static int`
`aaPairCode(char aa1, char aa2)`
Code an AA-pair
`static String`
`changeQuality(String qualityStr, org.biojava.nbio.genome.io.fastq.FastqVariant fqSrc, org.biojava.nbio.genome.io.fastq.FastqVariant fqDst)`
Change a fastQ encoding in a quality sequence
`static char`
`code2aa(byte aacode)`
Convert from AA_code to AA letter
`static String`
`code2aa(byte[] aacodes)`
Convert from AA_code to AA letter
`static String`
`code2aa(int[] aacodes)`
Convert from AA_code to AA letter
`static String`
`code2aaPair(int code)`
`static char`
`code2dna(byte dnacode)`
Convert from DNA_code to DNA letter
`static byte`
`dna2Code(char base)`
Convert from DNA letter to code
`static String`
`fastaSimpleRead(String fastaFile)`
Read a fasta file containing one (and only one) sequence
`static String`
`fastqId(org.biojava.nbio.genome.io.fastq.Fastq fastq)`
Get an ID from a fastq
`static boolean`
`isAmbiguous(String sequence)`
Are there any ambiguous bases in this sequence?
`static String`
`padN(String seq, int size)`
`static char`
`randBase(Random random)`
Random base
`static String`
`randSequence(Random random, int len)`
Random sequence
`static String`
`readId(String line)`
Create an ID: Remove everything after the first space char.
`static String`
`removeExt(String fileName)`
`static String`
`reverse(String seq)`
Reverse of a string (sequence)
`static String`
`reverseWc(String seq)`
Reverse Watson-Cricks complement
`static String`
`showMismatch(String seq1, String seq2, String prefix)`
Show differences between two sequences
`static String`
`string2fasta(String name, String sequence)`
Transform into a FASTA formatted string
`static char`
`wc(char base)`
Watson-Cricks complement
`static String`
`wc(String seq)`
Watson-Cricks complement

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### FASTQ_SANGER_ZERO

public static final char FASTQ_SANGER_ZERO

See Also:
  - Constant Field Values

### BASES

public static final char[] BASES

### AMINO_ACIDS

public static final char[] AMINO_ACIDS

### GAP_CODE

public static final byte GAP_CODE

See Also:
  - Constant Field Values

### KNOWN_FILE_EXTENSIONS

public static final String[] KNOWN_FILE_EXTENSIONS

### AA_TO_CODE

public static byte[] AA_TO_CODE

### CODE_TO_AA

public static char[] CODE_TO_AA

### DNA_TO_CODE

public static byte[] DNA_TO_CODE

### CODE_TO_DNA

public static char[] CODE_TO_DNA

## Constructor Details

### GprSeq

public GprSeq()

## Method Details

### aa2Code

public static byte aa2Code(char aa)
Convert from AA char to code

### aa2Code

public static byte[] aa2Code(String aa)
Convert from AA sequence to codes

### aaPairCode

public static int aaPairCode(byte aaCode1, byte aaCode2)
Code an AA-pair

### aaPairCode

public static int aaPairCode(char aa1, char aa2)
Code an AA-pair

### changeQuality

public static String changeQuality(String qualityStr, org.biojava.nbio.genome.io.fastq.FastqVariant fqSrc, org.biojava.nbio.genome.io.fastq.FastqVariant fqDst)
Change a fastQ encoding in a quality sequence

### code2aa

public static char code2aa(byte aacode)
Convert from AA_code to AA letter

### code2aa

public static String code2aa(byte[] aacodes)
Convert from AA_code to AA letter

### code2aa

public static String code2aa(int[] aacodes)
Convert from AA_code to AA letter

### code2aaPair

public static String code2aaPair(int code)

### code2dna

public static char code2dna(byte dnacode)
Convert from DNA_code to DNA letter

### dna2Code

public static byte dna2Code(char base)
Convert from DNA letter to code

### fastaSimpleRead

public static String fastaSimpleRead(String fastaFile)
Read a fasta file containing one (and only one) sequence

### fastqId

public static String fastqId(org.biojava.nbio.genome.io.fastq.Fastq fastq)
Get an ID from a fastq

Parameters:
  `fastq` -
Returns:
  Fastq's id

### isAmbiguous

public static boolean isAmbiguous(String sequence)
Are there any ambiguous bases in this sequence?

### padN

public static String padN(String seq, int size)

### randBase

public static char randBase(Random random)
Random base

### randSequence

public static String randSequence(Random random, int len)
Random sequence

### readId

public static String readId(String line)
Create an ID: Remove everything after the first space char. Remove trailing '/1' or '/2' (if any)

### removeExt

public static String removeExt(String fileName)

### reverse

public static String reverse(String seq)
Reverse of a string (sequence)

### reverseWc

public static String reverseWc(String seq)
Reverse Watson-Cricks complement

### showMismatch

public static String showMismatch(String seq1, String seq2, String prefix)
Show differences between two sequences

### string2fasta

public static String string2fasta(String name, String sequence)
Transform into a FASTA formatted string

### wc

public static char wc(char base)
Watson-Cricks complement

### wc

public static String wc(String seq)
Watson-Cricks complement