-
Notifications
You must be signed in to change notification settings - Fork 67
/
WGsim.h
42 lines (27 loc) · 1.29 KB
/
WGsim.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*++
Module Name:
WGSim.h
Abstract:
Handle FASTQ ID strings like the ones generated by WGSim
Authors:
Bill Bolosky, August, 2011
Environment:
User mode service.
Revision History:
Pulled from cSNAP to make it useful in more than one place
--*/
#pragma once
#include "GenomeIndex.h"
#include "Read.h"
// Is a wgsim-generated read mapped to a given location misaligned, given the source
// location encoded into its ID and a maximum edit distance maxK?
// Also optionally outputs the low and high location encoded in the wgsim read's ID.
bool wgsimReadMisaligned(Read *read, unsigned location, GenomeIndex *index, int maxK,
unsigned *lowOut = NULL, unsigned *highOut = NULL);
// Write a wgsim-style id string.
// Convert from 0-based to 1-based coordinates. If you're curious about the distinction, see:
// <http://www.biostars.org/post/show/6373/what-are-the-advantagesdisadvantages-of-one-based-vs-zero-based-genome-coordinate-systems/>
void wgsimGenerateIDString(const Genome::Piece *piece, unsigned offsetInPiece,
unsigned readLength, bool firstHalf, char *outputBuffer);
void wgsimGenerateIDString(const Genome *genome, unsigned genomeLocation,
unsigned readLength, bool firstHalf, char *outputBuffer);