You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* bamPath/baiUrl/bamFilehandle - a string file path to a local file or a class object with a read method
37
-
* csiPath/csiUrl/csiFilehandle - a CSI index for the BAM file, required for long chromosomes greater than 2^29 in length
38
-
* baiPath/baiUrl/baiFilehandle - a BAI index for the BAM file
39
-
* fetchSizeLimit - total size of the number of chunks being fetched at once. default: ~50MB
40
-
* chunkSizeLimit - size limit on any individual chunk. default: ~10MB
41
-
* cacheSize - limit on number of chunks to cache. default: 50
50
+
- bamPath/baiUrl/bamFilehandle - a string file path to a local file or a class object with a read method
51
+
- csiPath/csiUrl/csiFilehandle - a CSI index for the BAM file, required for long chromosomes greater than 2^29 in length
52
+
- baiPath/baiUrl/baiFilehandle - a BAI index for the BAM file
53
+
- fetchSizeLimit - total size of the number of chunks being fetched at once. default: ~50MB
54
+
- chunkSizeLimit - size limit on any individual chunk. default: ~10MB
55
+
- cacheSize - limit on number of chunks to cache. default: 50
42
56
43
57
Note: filehandles implement the Filehandle interface from https://www.npmjs.com/package/generic-filehandle. This module offers the path and url arguments as convenience methods for supplying the LocalFile and RemoteFile
This is a async generator function that takes the same signature as getRecordsForRange but results can be processed using
71
+
This is a async generator function that takes the same signature as getRecordsForRange but results can be processed using
60
72
61
73
for await(const chunk of file.streamRecordsForRange(refName, start, end, opts)) {
62
74
}
63
75
64
76
The getRecordsForRange simply wraps this process by concatenating chunks into an array
65
77
78
+
### async getHeader(opts: {....anything to pass to generic-filehandle opts})
79
+
80
+
This obtains the header from HtsgetFile or BamFile. Retrieves BAM file and BAI/CSI header if applicable, or API request for refnames from htsget
81
+
66
82
### async indexCov(refName, start, end)
67
83
68
-
* refName - a string for the chrom to fetch from
69
-
* start - a 0 based half open start coordinate (optional)
70
-
* end - a 0 based half open end coordinate (optional)
84
+
- refName - a string for the chrom to fetch from
85
+
- start - a 0 based half open start coordinate (optional)
86
+
- end - a 0 based half open end coordinate (optional)
71
87
72
88
Returns features of the form {start, end, score} containing estimated feature density across 16kb windows in the genome
73
89
74
-
75
90
### async lineCount(refName)
76
91
77
-
* refName - a string for the chrom to fetch from
92
+
- refName - a string for the chrom to fetch from
78
93
79
94
Returns number of features on refName, uses special pseudo-bin from the BAI/CSI index (e.g. bin 37450 from bai, returning n_mapped from SAM spec pdf) or -1 if refName not exist in sample
80
95
81
96
### async hasRefSeq(refName)
82
97
83
-
* refName - a string for the chrom to check
98
+
- refName - a string for the chrom to check
84
99
85
100
Returns whether we have this refName in the sample
86
101
@@ -121,14 +136,17 @@ Example
121
136
BAM tags such as MD can be obtained via
122
137
123
138
feature.get('MD')
124
-
139
+
125
140
A full list of tags that can be obtained can be obtained via
126
141
127
142
feature._tags()
128
-
129
-
143
+
130
144
The feature format may change in future versions to be more raw data records, but this will be a major version bump
0 commit comments