modified: pixi.toml
[GalaxyCodeBases.git] / released / pIRS.old / pIRS_simulator / simulate.h
blob7b5c8bb3a889952f81ef432bcef0b3d3b23cccef
1 #ifndef __SIMULATE_H_
2 #define __SIMULATE_H_
4 using namespace std;
6 extern char alphabet[128];
7 extern char alphabet2[128];
8 extern char Bases[5];
9 extern char c_bases[5];
11 //check whether a sequence contain non base characters, such as "N"
12 int check_seq (string &seq);
14 //find random number location
15 int search_location(double *Arr, uint64_t ArrNum, double random_num);
17 //simulate normal distribution insertsize by Box-muller method
18 int simulate_insertsize(int mean, int sd);
20 //simulate GC bias
21 int simulate_GC_bias(string insert_str, double *GC_bias_abundance);
23 //Realization of snp
24 char get_snp_match(char base, double snp_bias[]);
26 //Getting insert sequence when heterozygous indel rate is bigger than 0
27 string get_insertion(int num);
29 //get the reverse and complement sequence
30 string reversecomplementary (string read);
32 //Produce heterozygous SNPs
33 string Get_snp(string &seq,ofstream &snp,string id, double hetersnp_rate, double snp_bias[]);
35 //Getting invert sequence
36 string Get_invertion(string &seq, ofstream &invertion_file, string id, double SV_rate);
38 //Getting indel sequence
39 string Get_indel(string &seq,ofstream &indel,string id1,double heterindel_rate,double SV_rate);
41 #endif