Skip to content

Commit

Permalink
2024/10/24-10:59:43 (Linux cray unknown)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbenner committed Oct 24, 2024
1 parent 60a011a commit 3c52fe0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ Please find the API documentation [here](https://docs.rs/rustynetics/latest/rust
```rust
use crate::genes::Genes;

// Import from local file
if let Ok(genes) = Genes::import_genes("data/hg19.knownGene.txt.gz") {

println!("{}", genes);
}
// Retrieve from USCS server
if let Ok(genes) = Genes::import_genes_from_ucsc("hg19", "knownGene") {

println!("{}", genes);
Expand Down
2 changes: 1 addition & 1 deletion src/genes_ucsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::utility::is_gzip;

impl Genes {

pub fn read_ucsc_genes(filename: &str) -> Result<Genes, Box<dyn std::error::Error>> {
pub fn import_genes(filename: &str) -> Result<Genes, Box<dyn std::error::Error>> {
let mut names = vec![];
let mut seqnames = vec![];
let mut tx_from = vec![];
Expand Down

0 comments on commit 3c52fe0

Please sign in to comment.