Postprocessing utilities header. More...
Go to the source code of this file.
Macros | |
#define | SW_OUT_PAIR 0 |
Pairwise alignment pair output format. More... | |
#define | SW_OUT_PLOT 1 |
Pairwise alignment plotting output format. More... | |
#define | SW_OUT_STAT 2 |
Pairwise alignment stat output format. More... | |
#define | SW_OUT_STAT_PAIR 3 |
Pairwise alignment stat-pair output format. More... | |
#define | SW_OUT_DUMP 4 |
Pairwise alignment binary output format. More... | |
#define | SW_OUT_DB_BLASTM0 0 |
Database alignment blast m1-like output format. More... | |
#define | SW_OUT_DB_BLASTM8 1 |
Database alignment blast m8-like output format. More... | |
#define | SW_OUT_DB_BLASTM9 2 |
Database alignment blast m9-like output format. More... | |
#define | SW_OUT_DB_LIGHT 3 |
Database alignment light output format. More... | |
Functions | |
int | checkAlignment (Alignment *alignment) |
Checks if the alignment is correct. More... | |
Alignment * | readAlignment (char *path) |
Reads the alignment object from the binary file. More... | |
void | outputAlignment (Alignment *alignment, char *path, int type) |
Pairwise alignment output function. More... | |
void | outputScore (int score, Chain *query, Chain *target, Scorer *scorer, char *path) |
Score only output function. More... | |
void | outputDatabase (DbAlignment **dbAlignments, int dbAlignmentsLen, char *path, int type) |
Database alignment output function. More... | |
void | outputShotgunDatabase (DbAlignment ***dbAlignments, int *dbAlignmentsLens, int dbAlignmentsLen, char *path, int type) |
Shotgun database alignment output function. More... | |
void | dumpFastaChains (Chain **chains, int chainsLen, char *path) |
Database serialization function. More... | |
void | deleteFastaChains (Chain **chains, int chainsLen) |
Chain array delete utility. More... | |
void | deleteDatabase (DbAlignment **dbAlignments, int dbAlignmentsLen) |
Database delete utility. More... | |
void | deleteShotgunDatabase (DbAlignment ***dbAlignments, int *dbAlignmentsLens, int dbAlignmentsLen) |
Shotgun database delete utility. More... | |
Postprocessing utilities header.
#define SW_OUT_DB_BLASTM0 0 |
Database alignment blast m1-like output format.
Blast m1 output example: http://www.compbio.ox.ac.uk/analysis_tools/BLAST/BLAST_blastall/blastall_examples.shtml#m_0
#define SW_OUT_DB_BLASTM8 1 |
Database alignment blast m8-like output format.
Blast m8 output example: http://www.compbio.ox.ac.uk/analysis_tools/BLAST/BLAST_blastall/blastall_examples.shtml#m_8
#define SW_OUT_DB_BLASTM9 2 |
Database alignment blast m9-like output format.
Blast m9 output example: http://www.compbio.ox.ac.uk/analysis_tools/BLAST/BLAST_blastall/blastall_examples.shtml#m_9
#define SW_OUT_DB_LIGHT 3 |
Database alignment light output format.
Format outputs only the scores and the names of the output alignments.
#define SW_OUT_DUMP 4 |
Pairwise alignment binary output format.
This output can be read with the readAlignment().
#define SW_OUT_PAIR 0 |
Pairwise alignment pair output format.
Format is equal to the emboss pair output without the header. Emboss output example: http://emboss.sourceforge.net/docs/themes/alnformats/align.pair
#define SW_OUT_PLOT 1 |
Pairwise alignment plotting output format.
This output format is used as the input file for plotting with gnuplot.
#define SW_OUT_STAT 2 |
Pairwise alignment stat output format.
Format is equal to the emboss pair output header. Emboss output example: http://emboss.sourceforge.net/docs/themes/alnformats/align.pair
#define SW_OUT_STAT_PAIR 3 |
Pairwise alignment stat-pair output format.
Format is equal to the emboss pair output. Emboss output example: http://emboss.sourceforge.net/docs/themes/alnformats/align.pair
int checkAlignment | ( | Alignment * | alignment | ) |
Checks if the alignment is correct.
alignment | alignment object |
void deleteDatabase | ( | DbAlignment ** | dbAlignments, |
int | dbAlignmentsLen | ||
) |
Database delete utility.
Function calls dbAlignmentDelete() function on every dbAlignment object in dbAlignments array and then deletes the array.
dbAlignments | database alignments array |
dbAlignmentsLen | database alignments array length |
void deleteFastaChains | ( | Chain ** | chains, |
int | chainsLen | ||
) |
Chain array delete utility.
Function calls chainDelete() function on every chain and then deletes the array.
chains | chain array object |
chainsLen | chain array length |
void deleteShotgunDatabase | ( | DbAlignment *** | dbAlignments, |
int * | dbAlignmentsLens, | ||
int | dbAlignmentsLen | ||
) |
Shotgun database delete utility.
Function calls dbAlignmentDelete() function on every dbAlignment object in dbAlignments, deletes dbAlignments structure and then deletes dbAlignmentsLens array.
dbAlignments | database alignments array of arrays |
dbAlignmentsLens | database alignments arrays lengths |
dbAlignmentsLen | database alignments array of arrays length |
void dumpFastaChains | ( | Chain ** | chains, |
int | chainsLen, | ||
char * | path | ||
) |
Database serialization function.
Function creates a file named path.swsharp which represents the serialized version of the chain database which was read from the given path. Since reading of the serialized version of the database is much faster than reading the original one, this function is used for caching the databases for future usage.
chains | database chains |
chainsLen | database length |
path | original chain database file path |
void outputAlignment | ( | Alignment * | alignment, |
char * | path, | ||
int | type | ||
) |
Pairwise alignment output function.
alignment | alignment object |
path | output file path, if NULL output goes to standard output |
type | output format type, can be SW_OUT_PAIR, SW_OUT_PLOT, SW_OUT_STAT, SW_OUT_STAT_PAIR or SW_OUT_DUMP |
void outputDatabase | ( | DbAlignment ** | dbAlignments, |
int | dbAlignmentsLen, | ||
char * | path, | ||
int | type | ||
) |
Database alignment output function.
dbAlignments | database alignments array |
dbAlignmentsLen | database alignments array length |
path | output file path, if NULL output goes to standard output |
type | output format type, can be SW_OUT_DB_BLASTM0 , SW_OUT_DB_BLASTM8, SW_OUT_DB_BLASTM9 or SW_OUT_DB_LIGHT |
Score only output function.
score | alignment score |
query | query chain |
target | target chain |
scorer | scorer object used for alignment |
path | output file path, if NULL output goes to standard output |
void outputShotgunDatabase | ( | DbAlignment *** | dbAlignments, |
int * | dbAlignmentsLens, | ||
int | dbAlignmentsLen, | ||
char * | path, | ||
int | type | ||
) |
Shotgun database alignment output function.
dbAlignments | database alignments array of arrays |
dbAlignmentsLens | database alignments arrays lengths |
dbAlignmentsLen | database alignments array of arrays length |
path | output file path, if NULL output goes to standard output |
type | output format type, can be SW_OUT_DB_BLASTM0 , SW_OUT_DB_BLASTM8, SW_OUT_DB_BLASTM9 or SW_OUT_DB_LIGHT |
Alignment* readAlignment | ( | char * | path | ) |
Reads the alignment object from the binary file.
The binary file must previously be created with the outputAlignment() function with the SW_OUT_DUMP type.
path | input binary file path |