Skip to content

Commit c810cfe

Browse files
cmdcolinclaude
andcommitted
Update README and package.json for GMOD org move
- Update GitHub URLs from cmdcolin to GMOD org - Fix stale ParseOptions API docs, replace with actual exported functions - Fix broken usage example (gff.parseStringSync → parseStringSync) - Remove outdated --save flag and arrayrefs terminology Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 076935b commit c810cfe

2 files changed

Lines changed: 15 additions & 72 deletions

File tree

README.md

Lines changed: 14 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,29 @@
11
# gff-nostream
22

33
[![NPM version](https://img.shields.io/npm/v/gff-nostream.svg?style=flat-square)](https://npmjs.org/package/gff-nostream)
4-
[![Build Status](https://img.shields.io/github/actions/workflow/status/cmdcolin/gff-nostream/push.yml?branch=main)](https://github.com/cmdcolin/gff-nostream/actions?query=branch%3Amain+workflow%3APush+)
4+
[![Build Status](https://img.shields.io/github/actions/workflow/status/GMOD/gff-nostream/push.yml?branch=main)](https://github.com/GMOD/gff-nostream/actions?query=branch%3Amain+workflow%3APush+)
55

6-
Parse GFF3 data. This is a simplified version of
7-
[@gmod/gff](https://github.com/cmdcolin/gff-js) with just basic parsing and no
8-
node.js stream module usage
6+
Parse GFF3 data. A simplified version of [@gmod/gff](https://github.com/GMOD/gff-js) with no Node.js stream dependency.
97

108
## Install
119

12-
$ npm install --save gff-nostream
10+
$ npm install gff-nostream
1311

1412
## Usage
1513

1614
```js
1715
import { parseStringSync } from 'gff-nostream'
1816
import fs from 'fs'
1917

20-
// parse a string of gff3 synchronously
2118
const stringOfGFF3 = fs.readFileSync('my_annotations.gff3', 'utf8')
22-
const arrayOfThings = gff.parseStringSync(stringOfGFF3)
19+
const features = parseStringSync(stringOfGFF3)
2320
```
2421

2522
## Object format
2623

27-
### features
24+
In GFF3, features can have more than one location. Features are returned as arrays of all lines sharing the same ID. Values that are `.` in GFF3 are `null` in the output.
2825

29-
In GFF3, features can have more than one location. We parse features as
30-
arrayrefs of all the lines that share that feature's ID. Values that are `.` in
31-
the GFF3 are `null` in the output.
32-
33-
A simple feature that's located in just one place:
26+
A simple feature located in one place:
3427

3528
```json
3629
[
@@ -94,68 +87,18 @@ A CDS called `cds00001` located in two places:
9487

9588
## API
9689

97-
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
98-
99-
#### Table of Contents
100-
101-
- [ParseOptions](#parseoptions)
102-
- [disableDerivesFromReferences](#disablederivesfromreferences)
103-
- [encoding](#encoding)
104-
- [parseFeatures](#parsefeatures)
105-
- [parseDirectives](#parsedirectives)
106-
- [parseComments](#parsecomments)
107-
- [parseSequences](#parsesequences)
108-
- [parseAll](#parseall)
109-
110-
### ParseOptions
111-
112-
Parser options
113-
114-
#### disableDerivesFromReferences
115-
116-
Whether to resolve references to derives from features
117-
118-
Type:
119-
[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
120-
121-
#### encoding
122-
123-
Text encoding of the input GFF3. default 'utf8'
124-
125-
Type: BufferEncoding
126-
127-
#### parseFeatures
128-
129-
Whether to parse features, default true
130-
131-
Type:
132-
[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
133-
134-
#### parseDirectives
135-
136-
Whether to parse directives, default false
137-
138-
Type:
139-
[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
140-
141-
#### parseComments
142-
143-
Whether to parse comments, default false
90+
### `parseStringSync(str: string): GFF3Feature[]`
14491

145-
Type:
146-
[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
92+
Synchronously parse a GFF3 string and return an array of features.
14793

148-
#### parseSequences
94+
### `parseStringSyncJBrowse(str: string): JBrowseFeature[]`
14995

150-
Whether to parse sequences, default true
96+
Synchronously parse a GFF3 string and return features in JBrowse format (flat objects with `subfeatures` instead of `child_features`).
15197

152-
Type:
153-
[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
98+
### `parseRecords(records: LineRecord[]): GFF3Feature[]`
15499

155-
#### parseAll
100+
Parse an array of `LineRecord` objects. Useful when managing raw line data directly (e.g. from an indexed file with byte offsets).
156101

157-
Parse all features, directives, comments, and sequences. Overrides other parsing
158-
options. Default false.
102+
### `parseRecordsJBrowse(records: LineRecord[]): JBrowseFeature[]`
159103

160-
Type:
161-
[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
104+
Same as `parseRecords` but returns JBrowse-format features.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "MIT",
66
"repository": {
77
"type": "git",
8-
"url": "https://github.com/cmdcolin/gff-nostream.git"
8+
"url": "https://github.com/GMOD/gff-nostream.git"
99
},
1010
"type": "module",
1111
"types": "./dist/index.d.ts",

0 commit comments

Comments
 (0)