Mercurial > repos > portiahollyoak > fastuniq
annotate source/fastq_pair_array.c @ 0:816cb55b5a2d draft default tip
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
| author | portiahollyoak | 
|---|---|
| date | Thu, 02 Jun 2016 11:34:51 -0400 | 
| parents | |
| children | 
| rev | line source | 
|---|---|
| 
0
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
1 /**************************************************************************** | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
2 * The 'FASTQ_PAIR_ARRAY' structure group was used to store a array of | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
3 * paired FASTQ reads, including basic operation function as well. | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
4 * | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
5 * This file was written by Haibin Xu, December 2011. | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
6 ****************************************************************************/ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
7 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
8 #include "fastq_pair_array.h" | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
9 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
10 FASTQ_PAIR_ARRAY *fastq_pair_array_create() | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
11 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
12 /* create a FASTQ pair array. If successful, return the point to it, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
13 * otherwise, return NULL. | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
14 */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
15 FASTQ_PAIR_ARRAY *fq_pair_array; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
16 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
17 if((fq_pair_array=(FASTQ_PAIR_ARRAY *)malloc(sizeof(FASTQ_PAIR_ARRAY)))==NULL) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
18 return NULL; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
19 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
20 if((fq_pair_array->array= | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
21 (FASTQ_PAIR_ARRAY_BLOCK *)malloc(sizeof(FASTQ_PAIR_ARRAY_BLOCK)))==NULL) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
22 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
23 free(fq_pair_array); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
24 return NULL; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
25 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
26 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
27 fq_pair_array->last=fq_pair_array->array; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
28 fq_pair_array->block_num=1; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
29 fq_pair_array->fastq_pair_num=0; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
30 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
31 fq_pair_array->array->previous=NULL; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
32 fq_pair_array->array->next=NULL; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
33 fq_pair_array->array->num=0; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
34 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
35 fq_pair_array->index=NULL; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
36 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
37 return fq_pair_array; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
38 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
39 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
40 int fastq_pair_array_remove(FASTQ_PAIR_ARRAY *fq_pair_array) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
41 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
42 /* free the FASTQ pair array. If successful, return 0, otherwise | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
43 * return 1. | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
44 */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
45 long i; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
46 FASTQ_PAIR_ARRAY_BLOCK *fq_pair_array_block; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
47 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
48 if(fq_pair_array==NULL) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
49 return 1; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
50 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
51 fq_pair_array_block=fq_pair_array->last; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
52 for(;fq_pair_array_block!=NULL;) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
53 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
54 for(i=0;i<fq_pair_array_block->num;i++) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
55 fastq_pair_remove(fq_pair_array_block->block[i]); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
56 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
57 fq_pair_array_block=fq_pair_array_block->previous; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
58 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
59 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
60 if(fq_pair_array->index!=NULL) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
61 free(fq_pair_array->index); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
62 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
63 return 0; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
64 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
65 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
66 int fastq_pair_array_append(FASTQ_PAIR *fq_pair, FASTQ_PAIR_ARRAY *fq_pair_array) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
67 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
68 /* append a new FASTQ pair to the array. if successful, return 0, otherwise | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
69 * return 1. | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
70 */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
71 FASTQ_PAIR_ARRAY_BLOCK *block_temp; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
72 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
73 if(fq_pair_array==NULL || fq_pair==NULL) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
74 return 1; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
75 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
76 if(fq_pair_array->last->num<FASTQ_PAIR_ARRAY_BLOCK_SIZE) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
77 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
78 /* append to the last array_block */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
79 fq_pair_array->last->block[fq_pair_array->last->num++]=fq_pair; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
80 fq_pair_array->fastq_pair_num++; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
81 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
82 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
83 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
84 /* add a new array_block, amd append to it */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
85 if((block_temp= | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
86 (FASTQ_PAIR_ARRAY_BLOCK *)malloc(sizeof(FASTQ_PAIR_ARRAY_BLOCK)))==NULL) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
87 return 0; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
88 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
89 fq_pair_array->last->next=block_temp; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
90 block_temp->previous=fq_pair_array->last; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
91 fq_pair_array->last=block_temp; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
92 fq_pair_array->block_num++; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
93 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
94 block_temp->num=0; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
95 block_temp->block[block_temp->num++]=fq_pair; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
96 fq_pair_array->fastq_pair_num++; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
97 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
98 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
99 return 0; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
100 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
101 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
102 int fastq_pair_array_generate_index(FASTQ_PAIR_ARRAY *fq_pair_array) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
103 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
104 /* generate the index for given FASTQ_PAIR, if successful, return 0, otherwise | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
105 * return 1. | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
106 */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
107 FASTQ_PAIR_ARRAY_BLOCK **temp_index; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
108 FASTQ_PAIR_ARRAY_BLOCK *fq_array_block; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
109 long i; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
110 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
111 if(fq_pair_array==NULL) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
112 return 1; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
113 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
114 if(fq_pair_array->index!=NULL) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
115 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
116 free(fq_pair_array->index); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
117 fq_pair_array->index=NULL; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
118 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
119 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
120 if((temp_index=(FASTQ_PAIR_ARRAY_BLOCK **)malloc(sizeof(FASTQ_PAIR_ARRAY_BLOCK *)*(fq_pair_array->block_num)))==NULL) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
121 return 1; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
122 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
123 fq_array_block=fq_pair_array->array; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
124 for(i=0;i<fq_pair_array->block_num;i++) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
125 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
126 temp_index[i]=fq_array_block; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
127 fq_array_block=fq_array_block->next; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
128 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
129 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
130 fq_pair_array->index=temp_index; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
131 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
132 return 0; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
133 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
134 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
135 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
136 FASTQ_PAIR **fastq_pair_array_get_pointer(FASTQ_PAIR_ARRAY *fq_pair_array, long position) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
137 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
138 /* get double pointer to individual fastq_pair member at specific position | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
139 * in the array, if successful, return the double pointer, otherwise | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
140 * return NULL | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
141 */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
142 FASTQ_PAIR_ARRAY_BLOCK *fq_array_block; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
143 long block_num, num; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
144 long i; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
145 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
146 if(fq_pair_array==NULL || position<=0 || position>fq_pair_array->fastq_pair_num) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
147 return NULL; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
148 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
149 block_num=position/FASTQ_PAIR_ARRAY_BLOCK_SIZE; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
150 num=position%FASTQ_PAIR_ARRAY_BLOCK_SIZE; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
151 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
152 if(num==0) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
153 num=FASTQ_PAIR_ARRAY_BLOCK_SIZE; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
154 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
155 block_num++; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
156 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
157 if(fq_pair_array->index==NULL) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
158 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
159 fq_array_block=fq_pair_array->array; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
160 for(i=1;i<block_num;i++) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
161 fq_array_block=fq_array_block->next; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
162 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
163 return &fq_array_block->block[num-1]; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
164 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
165 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
166 return &fq_pair_array->index[block_num-1]->block[num-1]; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
167 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
168 return NULL; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
169 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
170 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
171 int fastq_pair_array_merge(FASTQ_PAIR_ARRAY *fq_pair_array, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
172 FASTQ_PAIR_ARRAY *temp_fq_pair_array, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
173 long low, long middle, long high) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
174 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
175 /* merge the two sorted part in array, low-middle and middle-high, into a | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
176 * single sorted order. If successful, return 0, otherwise return 1. | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
177 */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
178 long i, begin1, end1, begin2, end2; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
179 FASTQ_PAIR **fq_pair_current1, **fq_pair_current2; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
180 FASTQ_PAIR **temp_fq_pair_current; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
181 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
182 if(fq_pair_array==NULL || temp_fq_pair_array==NULL || | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
183 low > middle || middle > high || | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
184 fq_pair_array->fastq_pair_num!=temp_fq_pair_array->fastq_pair_num) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
185 return 1; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
186 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
187 begin1=low; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
188 end1=middle; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
189 begin2=middle+1; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
190 end2=high; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
191 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
192 /* merge processing */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
193 for(i = low; begin1 <= end1 && begin2 <= end2;i++) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
194 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
195 fq_pair_current1=fastq_pair_array_get_pointer(fq_pair_array, begin1); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
196 fq_pair_current2=fastq_pair_array_get_pointer(fq_pair_array, begin2); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
197 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
198 temp_fq_pair_current=fastq_pair_array_get_pointer(temp_fq_pair_array, i); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
199 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
200 if(fastq_pair_compare_tight(*fq_pair_current1, *fq_pair_current2)<=0) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
201 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
202 *temp_fq_pair_current=*fq_pair_current1; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
203 begin1++; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
204 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
205 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
206 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
207 *temp_fq_pair_current=*fq_pair_current2; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
208 begin2++; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
209 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
210 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
211 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
212 /* moving the remaining data to temp_fq_pair_array */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
213 if(begin1<=end1) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
214 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
215 for(;begin1<=end1;) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
216 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
217 temp_fq_pair_current=fastq_pair_array_get_pointer(temp_fq_pair_array, i++); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
218 fq_pair_current1=fastq_pair_array_get_pointer(fq_pair_array, begin1++); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
219 *temp_fq_pair_current=*fq_pair_current1; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
220 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
221 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
222 if(begin2<=end2) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
223 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
224 for(;begin2<=end2;) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
225 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
226 temp_fq_pair_current=fastq_pair_array_get_pointer(temp_fq_pair_array, i++); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
227 fq_pair_current2=fastq_pair_array_get_pointer(fq_pair_array, begin2++); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
228 *temp_fq_pair_current=*fq_pair_current2; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
229 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
230 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
231 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
232 /* moving the merged data to original position 'fq_pair_array' */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
233 for(i=low;i<=high;i++) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
234 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
235 fq_pair_current1=fastq_pair_array_get_pointer(fq_pair_array, i); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
236 temp_fq_pair_current=fastq_pair_array_get_pointer(temp_fq_pair_array, i); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
237 *fq_pair_current1=*temp_fq_pair_current; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
238 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
239 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
240 return 0; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
241 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
242 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
243 int fastq_pair_array_sort(FASTQ_PAIR_ARRAY *fq_pair_array, FASTQ_PAIR_ARRAY *temp_fq_pair_array, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
244 long first, long last) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
245 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
246 /* sort the FASTQ pair array. If successful, return 0, otherwise | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
247 * return 1 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
248 */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
249 long mid; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
250 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
251 if(first<last) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
252 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
253 mid=(first+last)/2; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
254 fastq_pair_array_sort(fq_pair_array, temp_fq_pair_array, first, mid); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
255 fastq_pair_array_sort(fq_pair_array, temp_fq_pair_array, mid+1, last); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
256 fastq_pair_array_merge(fq_pair_array, temp_fq_pair_array, first, mid, last); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
257 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
258 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
259 return 0; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
260 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
261 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
262 int fastq_pair_array_printf(FASTQ_PAIR_ARRAY *fq_pair_array, FILE *fp_out1, FILE *fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
263 char *format, int serial_flag, int flag_uniq) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
264 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
265 /* write the pair-end reads in the array in FASTA or FASTQ format into two | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
266 * output files(format='fa' or 'fq') or in FASTA format into a single output | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
267 * file(format="fa" and fp_out2==NULL) using the original description | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
268 * (serial_flag=0) or a new serial number(serial_flag=1). Output all sequences | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
269 * (flag_uniq==0), or unique ones(flag_uniq==1). If successful, return 0, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
270 * otherwise return 1. | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
271 */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
272 long i, k; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
273 FASTQ_PAIR **temp_fq_pair, **temp_fq_pair_old; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
274 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
275 if(flag_uniq==0) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
276 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
277 for(i=1;i<=fq_pair_array->fastq_pair_num;i++) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
278 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
279 temp_fq_pair=fastq_pair_array_get_pointer(fq_pair_array, i); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
280 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
281 if(serial_flag==0) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
282 fastq_pair_printf(*temp_fq_pair, fp_out1, fp_out2, format, -1); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
283 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
284 fastq_pair_printf(*temp_fq_pair, fp_out1, fp_out2, format, i); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
285 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
286 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
287 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
288 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
289 temp_fq_pair_old=fastq_pair_array_get_pointer(fq_pair_array, 1); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
290 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
291 /* the fastq_pair_array contain only one read-pair, output it */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
292 if(fq_pair_array->fastq_pair_num==1) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
293 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
294 if(serial_flag==0) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
295 fastq_pair_printf(*temp_fq_pair_old, fp_out1, fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
296 format, -1); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
297 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
298 fastq_pair_printf(*temp_fq_pair_old, fp_out1, fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
299 format, k++); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
300 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
301 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
302 /* compare and output */ | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
303 for(i=2, k=1;i<=fq_pair_array->fastq_pair_num;i++) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
304 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
305 temp_fq_pair=fastq_pair_array_get_pointer(fq_pair_array, i); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
306 if(fastq_pair_compare_loose(*temp_fq_pair_old, *temp_fq_pair)!=0) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
307 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
308 if(serial_flag==0) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
309 fastq_pair_printf(*temp_fq_pair_old, fp_out1, fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
310 format, -1); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
311 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
312 fastq_pair_printf(*temp_fq_pair_old, fp_out1, fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
313 format, k++); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
314 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
315 temp_fq_pair_old=temp_fq_pair; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
316 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
317 if(i==fq_pair_array->fastq_pair_num) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
318 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
319 if(serial_flag==0) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
320 fastq_pair_printf(*temp_fq_pair, fp_out1, fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
321 format, -1); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
322 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
323 fastq_pair_printf(*temp_fq_pair, fp_out1, fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
324 format, k++); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
325 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
326 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
327 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
328 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
329 if(fastq_pair_get_left_length(*temp_fq_pair_old) <= fastq_pair_get_left_length(*temp_fq_pair) && | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
330 fastq_pair_get_right_length(*temp_fq_pair_old) <= fastq_pair_get_right_length(*temp_fq_pair)) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
331 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
332 temp_fq_pair_old=temp_fq_pair; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
333 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
334 if(i==fq_pair_array->fastq_pair_num) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
335 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
336 if(serial_flag==0) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
337 fastq_pair_printf(*temp_fq_pair, fp_out1, fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
338 format, -1); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
339 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
340 fastq_pair_printf(*temp_fq_pair, fp_out1, fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
341 format, k++); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
342 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
343 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
344 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
345 { | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
346 if(serial_flag==0) | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
347 fastq_pair_printf(*temp_fq_pair_old, fp_out1, fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
348 format, -1); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
349 else | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
350 fastq_pair_printf(*temp_fq_pair_old, fp_out1, fp_out2, | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
351 format, k++); | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
352 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
353 temp_fq_pair_old=temp_fq_pair; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
354 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
355 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
356 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
357 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
358 return 0; | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
359 } | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
360 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
361 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
362 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
363 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
364 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
365 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
366 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
367 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
368 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
369 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
370 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
371 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
372 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
373 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
374 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
375 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
376 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
377 | 
| 
 
816cb55b5a2d
planemo upload for repository https://github.com/portiahollyoak/Tools commit c4769fd68ad9583d4b9dbdf212e4ecb5968cef1c-dirty
 
portiahollyoak 
parents:  
diff
changeset
 | 
378 | 
