ajseqtype.c


Function ajSeqTypeCheckS

Tests the type of a sequence is compatible with a defined type. If the type can have gaps, also tests for gap characters. Used for input validation - writes error message if the type check fails

Synopsis

Prototype
AjBool ajSeqTypeCheckS (
      AjPStr* pthys,
      const AjPStr type_name
);

TypeNameRead/WriteDescription
AjPStr*pthysModifySequence string
const AjPStrtype_nameInputSequence type
AjBool RETURNajTrue if compatible.

Input
type_name:(Input)Sequence type
Input & Output
pthys:(Modify)Sequence string
Returns
AjBool:ajTrue if compatible.

Description

Tests the type of a sequence is compatible with a defined type. If the type can have gaps, also tests for gap characters. Used for input validation - writes error message if the type check fails

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeCheckIn

Tests the type of a sequence is compatible with a defined type. If the type can have gaps, also tests for gap characters. Used for input validation - writes error message if the type check fails

Synopsis

Prototype
AjBool ajSeqTypeCheckIn (
      AjPSeq thys,
      const AjPSeqin seqin
);

TypeNameRead/WriteDescription
AjPSeqthysModifySequence object
const AjPSeqinseqinInputSequence input object
AjBool RETURNajTrue if compatible.

Input
seqin:(Input)Sequence input object
Input & Output
thys:(Modify)Sequence object
Returns
AjBool:ajTrue if compatible.

Description

Tests the type of a sequence is compatible with a defined type. If the type can have gaps, also tests for gap characters. Used for input validation - writes error message if the type check fails

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeNucS

Checks sequence type for nucleotide without gaps.

RNA and DNA codes are accepted as is.

Synopsis

Prototype
char ajSeqTypeNucS (
      const AjPStr thys
);

TypeNameRead/WriteDescription
const AjPStrthysInputSequence string (unchanged at present)
char RETURNinvalid character if any.

Input
thys:(Input)Sequence string (unchanged at present)
Returns
char:invalid character if any.

Description

Checks sequence type for nucleotide without gaps.

RNA and DNA codes are accepted as is.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeDnaS

Checks sequence type for DNA without gaps.

RNA and DNA codes are accepted as is.

Synopsis

Prototype
char ajSeqTypeDnaS (
      const AjPStr thys
);

TypeNameRead/WriteDescription
const AjPStrthysInputSequence string (unchanged at present)
char RETURNinvalid character if any.

Input
thys:(Input)Sequence string (unchanged at present)
Returns
char:invalid character if any.

Description

Checks sequence type for DNA without gaps.

RNA and DNA codes are accepted as is.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeRnaS

Checks sequence type for RNA without gaps

RNA codes are accepted as is.

Synopsis

Prototype
char ajSeqTypeRnaS (
      const AjPStr thys
);

TypeNameRead/WriteDescription
const AjPStrthysInputSequence string (unchanged at present)
char RETURNinvalid character if any.

Input
thys:(Input)Sequence string (unchanged at present)
Returns
char:invalid character if any.

Description

Checks sequence type for RNA without gaps

RNA codes are accepted as is.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeGapdnaS

Checks sequence type for Dna with gaps

DNA codes are accepted as is.

Synopsis

Prototype
char ajSeqTypeGapdnaS (
      const AjPStr thys
);

TypeNameRead/WriteDescription
const AjPStrthysInputSequence string (unchanged at present)
char RETURNinvalid character if any.

Input
thys:(Input)Sequence string (unchanged at present)
Returns
char:invalid character if any.

Description

Checks sequence type for Dna with gaps

DNA codes are accepted as is.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeGaprnaS

Checks sequence type for RNA with gaps

RNA codes are accepted as is.

Synopsis

Prototype
char ajSeqTypeGaprnaS (
      const AjPStr thys
);

TypeNameRead/WriteDescription
const AjPStrthysInputSequence string (unchanged at present)
char RETURNinvalid character if any.

Input
thys:(Input)Sequence string (unchanged at present)
Returns
char:invalid character if any.

Description

Checks sequence type for RNA with gaps

RNA codes are accepted as is.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeGapnucS

Checks sequence type for nucleotide with gaps.

RNA and DNA codes are accepted as is.

Synopsis

Prototype
char ajSeqTypeGapnucS (
      const AjPStr thys
);

TypeNameRead/WriteDescription
const AjPStrthysInputSequence string (unchanged at present)
char RETURNinvalid character if any.

Input
thys:(Input)Sequence string (unchanged at present)
Returns
char:invalid character if any.

Description

Checks sequence type for nucleotide with gaps.

RNA and DNA codes are accepted as is.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeAnyprotS

Checks sequence type for anything that can be in a protein sequence

Stop codes are replaced with gaps.

Synopsis

Prototype
char ajSeqTypeAnyprotS (
      const AjPStr thys
);

TypeNameRead/WriteDescription
const AjPStrthysInputSequence string (unchanged at present)
char RETURNinvalid character if any.

Input
thys:(Input)Sequence string (unchanged at present)
Returns
char:invalid character if any.

Description

Checks sequence type for anything that can be in a protein sequence

Stop codes are replaced with gaps.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeProtS

Checks sequence type for anything that can be in a protein sequence

Stop codes are replaced with gaps.

Synopsis

Prototype
char ajSeqTypeProtS (
      const AjPStr thys
);

TypeNameRead/WriteDescription
const AjPStrthysInputSequence string (unchanged at present)
char RETURNinvalid character if any.

Input
thys:(Input)Sequence string (unchanged at present)
Returns
char:invalid character if any.

Description

Checks sequence type for anything that can be in a protein sequence

Stop codes are replaced with gaps.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeGapanyS

Checks sequence type for any sequence with gaps.

Stops ('*') are allowed so this could be a 3 frame translation of DNA.

Synopsis

Prototype
char ajSeqTypeGapanyS (
      const AjPStr thys
);

TypeNameRead/WriteDescription
const AjPStrthysInputSequence string (unchanged at present)
char RETURNinvalid character if any.

Input
thys:(Input)Sequence string (unchanged at present)
Returns
char:invalid character if any.

Description

Checks sequence type for any sequence with gaps.

Stops ('*') are allowed so this could be a 3 frame translation of DNA.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqGap

Sets non-sequence characters to valid gap characters, and pads with extra gaps if necessary to a specified length

Synopsis

Prototype
void ajSeqGap (
      AjPSeq thys,
      char gapc,
      char padc
);

TypeNameRead/WriteDescription
AjPSeqthysModifySequence
chargapcInputStandard gap character
charpadcInputGap character for ends of sequence
void RETURN

Input
gapc:(Input)Standard gap character
padc:(Input)Gap character for ends of sequence
Input & Output
thys:(Modify)Sequence
Returns
void:No return value

Description

Sets non-sequence characters to valid gap characters, and pads with extra gaps if necessary to a specified length

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqGapLen

Sets non-sequence characters to valid gap characters, and pads with extra gaps if necessary to a specified length

Synopsis

Prototype
void ajSeqGapLen (
      AjPSeq thys,
      char gapc,
      char padc,
      ajint ilen
);

TypeNameRead/WriteDescription
AjPSeqthysModifySequence
chargapcInputStandard gap character
charpadcInputGap character for ends of sequence
ajintilenInputSequence length. Expanded if longer than current length
void RETURN

Input
gapc:(Input)Standard gap character
padc:(Input)Gap character for ends of sequence
ilen:(Input)Sequence length. Expanded if longer than current length
Input & Output
thys:(Modify)Sequence
Returns
void:No return value

Description

Sets non-sequence characters to valid gap characters, and pads with extra gaps if necessary to a specified length

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqGapS

Sets non-sequence characters to valid gap characters, and pads with extra gaps if necessary to a specified length

Synopsis

Prototype
void ajSeqGapS (
      AjPStr* seq,
      char gapc
);

TypeNameRead/WriteDescription
AjPStr*seqModifySequence
chargapcInputStandard gap character
void RETURN

Input
gapc:(Input)Standard gap character
Input & Output
seq:(Modify)Sequence
Returns
void:No return value

Description

Sets non-sequence characters to valid gap characters, and pads with extra gaps if necessary to a specified length

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqSetNuc

Sets a sequence type to "nucleotide"

Synopsis

Prototype
void ajSeqSetNuc (
      AjPSeq thys
);

TypeNameRead/WriteDescription
AjPSeqthysModifySequence object
void RETURN

Input & Output
thys:(Modify)Sequence object
Returns
void:No return value

Description

Sets a sequence type to "nucleotide"

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqSetProt

Sets a sequence type to "protein"

Synopsis

Prototype
void ajSeqSetProt (
      AjPSeq thys
);

TypeNameRead/WriteDescription
AjPSeqthysModifySequence object
void RETURN

Input & Output
thys:(Modify)Sequence object
Returns
void:No return value

Description

Sets a sequence type to "protein"

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqsetSetNuc

Sets a sequence set type to "nucleotide"

Synopsis

Prototype
void ajSeqsetSetNuc (
      AjPSeqset thys
);

TypeNameRead/WriteDescription
AjPSeqsetthysModifySequence set object
void RETURN

Input & Output
thys:(Modify)Sequence set object
Returns
void:No return value

Description

Sets a sequence set type to "nucleotide"

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqsetSetProt

Sets a sequence set type to "protein"

Synopsis

Prototype
void ajSeqsetSetProt (
      AjPSeqset thys
);

TypeNameRead/WriteDescription
AjPSeqsetthysModifySequence set object
void RETURN

Input & Output
thys:(Modify)Sequence set object
Returns
void:No return value

Description

Sets a sequence set type to "protein"

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqType

Sets the type of a sequence if it has not yet been defined.

Synopsis

Prototype
void ajSeqType (
      AjPSeq thys
);

TypeNameRead/WriteDescription
AjPSeqthysModifySequence object
void RETURN

Input & Output
thys:(Modify)Sequence object
Returns
void:No return value

Description

Sets the type of a sequence if it has not yet been defined.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqPrintType

Prints the seqType definitions. For EMBOSS entrails output

Synopsis

Prototype
void ajSeqPrintType (
      AjPFile outf,
      AjBool full
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
AjBoolfullInputFull output
void RETURN

Input
full:(Input)Full output
Input & Output
outf:(Modify)Output file
Returns
void:No return value

Description

Prints the seqType definitions. For EMBOSS entrails output

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeIsProt

Returns ajTrue is sequence type can be a protein (or 'any')

Synopsis

Prototype
AjBool ajSeqTypeIsProt (
      const AjPStr type_name
);

TypeNameRead/WriteDescription
const AjPStrtype_nameInputSequence type
AjBool RETURNajTrue if sequence can be protein

Input
type_name:(Input)Sequence type
Returns
AjBool:ajTrue if sequence can be protein

Description

Returns ajTrue is sequence type can be a protein (or 'any')

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeIsNuc

Returns ajTrue is sequence type can be a nucleotide (or 'any')

Synopsis

Prototype
AjBool ajSeqTypeIsNuc (
      const AjPStr type_name
);

TypeNameRead/WriteDescription
const AjPStrtype_nameInputSequence type
AjBool RETURNajTrue if sequence can be nucleotide

Input
type_name:(Input)Sequence type
Returns
AjBool:ajTrue if sequence can be nucleotide

Description

Returns ajTrue is sequence type can be a nucleotide (or 'any')

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeIsAny

Returns ajTrue is sequence type can be a protein or nucleotide

Synopsis

Prototype
AjBool ajSeqTypeIsAny (
      const AjPStr type_name
);

TypeNameRead/WriteDescription
const AjPStrtype_nameInputSequence type
AjBool RETURNajTrue if sequence can be protein or nucleotide

Input
type_name:(Input)Sequence type
Returns
AjBool:ajTrue if sequence can be protein or nucleotide

Description

Returns ajTrue is sequence type can be a protein or nucleotide

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeSummary

Returns ajTrue is sequence type can be a protein or nucleotide

Synopsis

Prototype
AjBool ajSeqTypeSummary (
      const AjPStr type_name,
      AjPStr* Ptype,
      AjBool* gaps
);

TypeNameRead/WriteDescription
const AjPStrtype_nameInputSequence type
AjPStr*PtypeOutputSequence type 'protein' 'nucleotide' or 'any'
AjBool*gapsOutputTrue if gap characters are preserved
AjBool RETURNajTrue if sequence can be protein or nucleotide

Input
type_name:(Input)Sequence type
Output
Ptype:(Output)Sequence type 'protein' 'nucleotide' or 'any'
gaps:(Output)True if gap characters are preserved
Returns
AjBool:ajTrue if sequence can be protein or nucleotide

Description

Returns ajTrue is sequence type can be a protein or nucleotide

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeExit

Cleans up sequence type processing internal memory

Synopsis

Prototype
void ajSeqTypeExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

Returns
void:No return value

Description

Cleans up sequence type processing internal memory

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajSeqTypeUnused

Dummy function to catch all unused functions defined in the ajseqtype source file.

Synopsis

Prototype
void ajSeqTypeUnused (
      void
);

TypeNameRead/WriteDescription
void RETURN

Returns
void:No return value

Description

Dummy function to catch all unused functions defined in the ajseqtype source file.

See Also

See other functions in this section

Availability

In release 6.4.0