| 1 |
/*=========================================================================== |
| 2 |
* |
| 3 |
* PUBLIC DOMAIN NOTICE |
| 4 |
* National Center for Biotechnology Information |
| 5 |
* |
| 6 |
* This software/database is a "United States Government Work" under the |
| 7 |
* terms of the United States Copyright Act. It was written as part of |
| 8 |
* the author's official duties as a United States Government employee and |
| 9 |
* thus cannot be copyrighted. This software/database is freely available |
| 10 |
* to the public for use. The National Library of Medicine and the U.S. |
| 11 |
* Government have not placed any restriction on its use or reproduction. |
| 12 |
* |
| 13 |
* Although all reasonable efforts have been taken to ensure the accuracy |
| 14 |
* and reliability of the software and data, the NLM and the U.S. |
| 15 |
* Government do not and cannot warrant the performance or results that |
| 16 |
* may be obtained by using this software or data. The NLM and the U.S. |
| 17 |
* Government disclaim all warranties, express or implied, including |
| 18 |
* warranties of performance, merchantability or fitness for any particular |
| 19 |
* purpose. |
| 20 |
* |
| 21 |
* Please cite the author in any work or product based on this material. |
| 22 |
* |
| 23 |
* =========================================================================== |
| 24 |
* |
| 25 |
*/ |
| 26 |
#ifndef _h_sra_fastq_ |
| 27 |
#define _h_sra_fastq_cxx . . $ `interfaces/sra/fastq.h:27:9`! |
| 28 |
|
| 29 |
#ifndef _h_sra_rd_extern_cxx . . $ `interfaces/sra/rd-extern.h:28:9`! |
| 30 |
#include <sra/rd-extern.h> |
| 31 |
#endif |
| 32 |
|
| 33 |
#ifndef _h_sra_sradb_ |
| 34 |
#include <sra/sradb.h>cxx . . $ `<file>/interfaces/sra/sradb.h`/ |
| 35 |
#endif |
| 36 |
|
| 37 |
#ifdef __cplusplus |
| 38 |
extern "C" { |
| 39 |
#endif |
| 40 |
|
| 41 |
/*-------------------------------------------------------------------------- |
| 42 |
* FastqReader |
| 43 |
*/ |
| 44 |
typedef struct FastqReadercxx . . $ FastqReader# FastqReadercxx . . $ FastqReader#; |
| 45 |
|
| 46 |
/* Make |
| 47 |
* create FastqReader reference based |
| 48 |
* on opened table and properties: |
| 49 |
* table - SRATable |
| 50 |
* accession - accession |
| 51 |
* minReadLen - minimal length of the outputed read, 0 - no minimum (FUSE) |
| 52 |
* colorSpace - color space sequence |
| 53 |
* origFormat - excludes SRR accession & length on defline |
| 54 |
* fasta - prepare only reads, no qualities |
| 55 |
* readLabel - prints read label on the name line |
| 56 |
* readId - prints .read in spot id on the name line (not in origFormat) |
| 57 |
* noclip - don't clip quality left and right |
| 58 |
* offset - offset to use for quality conversion (default is 33) |
| 59 |
* csKey - desired color space key, '\0' - do not convert |
| 60 |
* minSpotId - starting spot id, 0 - ignored (run information used) |
| 61 |
* maxSpotId - ending spot id, 0 - ignored (run information used) |
| 62 |
* you cannot seek out of range of [minSpotId:maxSpotId] |
| 63 |
*/ |
| 64 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReaderMakecxx . . $ FastqReaderMake(491f7cb82ba016e5).(const FastqReadercxx . . $ FastqReader#** self, const SRATablecxx . . $ SRATable#* table, const char* accession, |
| 65 |
boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! colorSpace, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! origFormat, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! fasta, |
| 66 |
boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! printLabel, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! printReadId, |
| 67 |
boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! noClip, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! SuppressQualForCSKey, uint32_tcxx . . $ uint32_t# minReadLen, |
| 68 |
char offset, char csKey, |
| 69 |
spotid_tcxx . . $ spotid_t# minSpotId, spotid_tcxx . . $ spotid_t# maxSpotId); |
| 70 |
|
| 71 |
/* Whack |
| 72 |
* releases object obtained from FastqReaderMake |
| 73 |
*/ |
| 74 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReaderWhackcxx . . $ FastqReaderWhack(58689852d00d179d).(const FastqReadercxx . . $ FastqReader#* self); |
| 75 |
|
| 76 |
/* FirstSpot |
| 77 |
* set current spot to first in the run |
| 78 |
*/ |
| 79 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReaderFirstSpotcxx . . $ FastqReaderFirstSpot(58689852d00d179d).(const FastqReadercxx . . $ FastqReader#* self); |
| 80 |
|
| 81 |
/* SeekSpot |
| 82 |
* set current spot |
| •83 |
* if error occurred current spot position becomes 0 |
| 84 |
*/ |
| 85 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReaderSeekSpotcxx . . $ FastqReaderSeekSpot(5d2493de4131d3a0).(const FastqReadercxx . . $ FastqReader#* self, spotid_tcxx . . $ spotid_t# spot); |
| 86 |
|
| 87 |
/* NextSpot |
| 88 |
* Seek to next spot from current |
| 89 |
*/ |
| 90 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReaderNextSpotcxx . . $ FastqReaderNextSpot(58689852d00d179d).(const FastqReadercxx . . $ FastqReader#* self); |
| 91 |
|
| 92 |
/* CurrentSpot |
| 93 |
* Get current spot |
| 94 |
* sopt [OUT] - pointer to assign value of the current spot |
| 95 |
* returns GetRCState(rc) == rcExhausted when out of spots |
| 96 |
*/ |
| 97 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReaderCurrentSpotcxx . . $ FastqReaderCurrentSpot(d84d3abcd14721ec).(const FastqReadercxx . . $ FastqReader#* self, spotid_tcxx . . $ spotid_t#* spot); |
| 98 |
|
| 99 |
/* SpotInfo |
| 100 |
* Get current spot information |
| 101 |
* spotname [OUT] - pointer to assign value of the current spot name (can be NULL) |
| 102 |
* spotname_sz [OUT] - pointer to assign value of the length of the spot name (can be NULL) |
| 103 |
* spotgroup [OUT] - pointer to assign value of the current spot group (can be NULL) |
| 104 |
* spotgroup_sz [OUT] - pointer to assign value of the length of the spot group (can be NULL) |
| 105 |
* spot_len [OUT] - pointer to assign value of the current spot length (can be NULL) |
| 106 |
* num_reads[OUT] - pointer to assign value of the number of reads in current spot (can be NULL) |
| 107 |
*/ |
| 108 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReader_SpotInfocxx . . $ FastqReader_SpotInfo(714384af2b21a030).(const FastqReadercxx . . $ FastqReader#* self, |
| 109 |
const char** spotname, size_t* spotname_sz, |
| 110 |
const char** spotgroup, size_t* spotgroup_sz, |
| 111 |
uint32_tcxx . . $ uint32_t#* spot_len, uint32_tcxx . . $ uint32_t#* num_reads); |
| 112 |
|
| 113 |
/* SpotReadInfo |
| 114 |
* Get read information for current spot |
| 115 |
* readid [IN] - 1-based read id |
| 116 |
* read_type [OUT] - pointer to assign value of the read type (can be NULL) |
| 117 |
* read_label[OUT] - pointer to assign value of the read label (can be NULL) |
| 118 |
* read_label_sz [OUT] - pointer to assign value of the length of the read label (can be NULL) |
| 119 |
* read_start[OUT] - pointer to assign value of the read start in spot (can be NULL) |
| 120 |
* read_len [OUT] - pointer to assign value of the read length (can be NULL) |
| 121 |
* cskey [OUT] - pointer to assign value of the read color space key (can be NULL) |
| 122 |
* if start and len is == 0 read is empty |
| 123 |
*/ |
| 124 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReader_SpotReadInfocxx . . $ FastqReader_SpotReadInfo(75a55b5c16af937f).(const FastqReadercxx . . $ FastqReader#* self, uint32_tcxx . . $ uint32_t# readId, SRAReadTypescxx . . $ SRAReadTypes#* read_type, |
| 125 |
const char** read_label, INSDC_coord_lencxx . . $ INSDC_coord_len#* read_label_sz, |
| 126 |
INSDC_coord_zerocxx . . $ INSDC_coord_zero#* read_start, INSDC_coord_lencxx . . $ INSDC_coord_len#* read_len); |
| 127 |
|
| 128 |
/* BaseName |
| 129 |
* retrieve name string for the spot, result always has '\0' at the and (asciiz string) |
| 130 |
* readid [IN] - 1-based, if <= 0 than the whole spot, otherwise particular read |
| 131 |
* label [IN] - overrides read label appending (printLabel), set to NULL by default |
| 132 |
* data [IN] - pointer to buffer for printing |
| 133 |
* dsize [IN] - data buffer size |
| 134 |
* written [IN,OUT] - optional number of bytes occupied by string |
| 135 |
* (not including the trailing '\0' used to end output), may by more than dsize |
| 136 |
*/ |
| 137 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReaderBaseNamecxx . . $ FastqReaderBaseName(f5c3d783990e1933).(const FastqReadercxx . . $ FastqReader#* self, uint32_tcxx . . $ uint32_t# readId, |
| 138 |
boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!* label, char* data, size_t dsize, size_t* written); |
| 139 |
|
| 140 |
/* Base |
| 141 |
* retrieve bases for the spot |
| 142 |
* other parameters see description for FastqReaderBaseName above |
| 143 |
*/ |
| 144 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReaderBasecxx . . $ FastqReaderBase(da1204d2983149e4).(const FastqReadercxx . . $ FastqReader#* self, uint32_tcxx . . $ uint32_t# readId, |
| 145 |
char* data, size_t dsize, size_t* written); |
| 146 |
|
| 147 |
/* QualityName |
| 148 |
* retrieve quality name string for the spot |
| 149 |
* other parameters see description for FastqReaderBaseName above |
| 150 |
*/ |
| 151 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReaderQualityNamecxx . . $ FastqReaderQualityName(f5c3d783990e1933).(const FastqReadercxx . . $ FastqReader#* self, uint32_tcxx . . $ uint32_t# readId, |
| 152 |
boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`!* label, char* data, size_t dsize, size_t* written); |
| 153 |
|
| 154 |
/* Quality |
| 155 |
* retrieve quality string for the spot |
| 156 |
* other parameters see description for FastqReaderBaseName above |
| 157 |
*/ |
| 158 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReaderQualitycxx . . $ FastqReaderQuality(da1204d2983149e4).(const FastqReadercxx . . $ FastqReader#* self, uint32_tcxx . . $ uint32_t# readId, |
| 159 |
char* data, size_t dsize, size_t* written); |
| 160 |
|
| 161 |
/* GetCurrentSpotData |
| 162 |
* retrieve current spot data as a blob |
| 163 |
* other parameters see description for FastqReaderBaseName above |
| 164 |
*/ |
| 165 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReader_GetCurrentSpotDatacxx . . $ FastqReader_GetCurrentSpotData(936d04e408249fef).(const FastqReadercxx . . $ FastqReader#* self, |
| 166 |
char* data, size_t dsize, size_t* written); |
| 167 |
|
| 168 |
/* GetCurrentSpotSplitData |
| 169 |
* same as above but split spot into line with individual reads |
| 170 |
*/ |
| 171 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReader_GetCurrentSpotSplitDatacxx . . $ FastqReader_GetCurrentSpotSplitData(936d04e408249fef).(const FastqReadercxx . . $ FastqReader#* self, |
| 172 |
char* data, size_t dsize, size_t* written); |
| 173 |
|
| 174 |
/* GetNextSpotData (streaming function) |
| 175 |
* move to the next spot and retrieve current spot data as a blob |
| 176 |
* other parameters see description for FastqReaderBaseName above |
| 177 |
*/ |
| 178 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReader_GetNextSpotDatacxx . . $ FastqReader_GetNextSpotData(936d04e408249fef).(const FastqReadercxx . . $ FastqReader#* self, |
| 179 |
char* data, size_t dsize, size_t* written); |
| 180 |
|
| 181 |
/* GetNextSpotSplitData (streaming function) |
| 182 |
* same as above but split spot into line with individual reads |
| 183 |
*/ |
| 184 |
SRA_RD_EXTERNcxx . . $ `interfaces/sra/rd-extern.h:31:9`! rc_tcxx . . $ rc_t# CCcxx . . $ `interfaces/kfc/callconv.h:44:11`! FastqReader_GetNextSpotSplitDatacxx . . $ FastqReader_GetNextSpotSplitData(936d04e408249fef).(const FastqReadercxx . . $ FastqReader#* self, |
| 185 |
char* data, size_t dsize, size_t* written); |
| 186 |
|
| 187 |
#ifdef __cplusplus |
| 188 |
} |
| 189 |
#endif |
| 190 |
|
| 191 |
#endif /* _h_sra_fastq_ */ |