-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
# I/O | ||
|
||
## Input | ||
Annotation files are read with `readgbk(input)` or `readgff(input)`. Currently these assume that the file follows either standard [GenBank format](http://www.insdc.org/files/feature_table.html#7.1.2), or [GFF3](https://www.ncbi.nlm.nih.gov/genbank/genomes_gff/). Any metadata in GFF3 files, apart from the header, is ignored. | ||
Annotation files are read with `GenBank.Reader` and `GFF.Reader`. Currently these assume that the file follows either standard [GenBank format](http://www.insdc.org/files/feature_table.html#7.1.2), or [GFF3](https://www.ncbi.nlm.nih.gov/genbank/genomes_gff/). Any metadata in GFF3 files, apart from the header, is ignored. | ||
```julia | ||
open(GenBank.Reader, "example.gbk") do reader | ||
for record in reader | ||
do_something() | ||
end | ||
end | ||
``` | ||
`readgbk(input)` and `readgff(input)` are aliases for `collect(open(GenBank.Reader, input))` and `collect(open(GFF.Reader, input))`, respectively. | ||
|
||
```@docs | ||
readgbk | ||
readgff | ||
GenBank.Reader | ||
GFF.Reader | ||
``` | ||
|
||
## Output | ||
Annotations can be printed with GenBank formatting using `printgbk`, and as GFF3 with `printgff`. Headers are not automatically converted between formats; `printgff` only prints the header of the first `Chromosome`, and only if it starts with a `#`, while `printgbk` prints a default header if the stored one starts with `#`. | ||
Annotations can be printed with GenBank formatting using `GenBank.Writer`, and as GFF3 with `GFF.Writer`. Headers are not automatically converted between formats; `GFF.Writer` only prints the header of the first `Record`, and only if it starts with a `#`, while `GenBank.Writer` prints a default header if the stored one starts with `#`. | ||
|
||
```@docs | ||
printgbk | ||
printgff | ||
GenBank.Writer | ||
GFF.Writer | ||
``` | ||
|
||
In the REPL, instances of `Gene` are displayed as they would be in the annotation file. |
7f2ae00
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
7f2ae00
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/32820
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: