-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add cram and fcs * fix: bad name
- Loading branch information
Showing
20 changed files
with
21,005 additions
and
15 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CHROMOSOME_I 1009800 14 50 51 | ||
CHROMOSOME_II 5000 1030025 50 51 | ||
CHROMOSOME_III 5000 1035141 50 51 | ||
CHROMOSOME_IV 5000 1040256 50 51 | ||
CHROMOSOME_V 5000 1045370 50 51 | ||
CHROMOSOME_X 5000 1050484 50 51 | ||
CHROMOSOME_MtDNA 5000 1055602 50 51 |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
>rand1k | ||
TCCTAATTCTGGGTAACCGCCGCCTGAAGCCAAAAAATAAGCCGGAGCCAAGGGGGAGTC | ||
ACACTGCTCCACGAACGCCTCTCATACAGCTTCGTCTTACAGGTGGAGATCATTGTCCCG | ||
GAGAGTCATGTGCCTTAGTTAAAAAGGTTTACTGCGCTCGGGGTCGAGTGCGGGAACTTC | ||
TCGGGTGGCTACGTACCGGGGCCTACCTTGCTATCTTTGACAATCAGCGTTCTGGATTGT | ||
CAGGCTCACTTCCGTAGCAGTTGCTGGAGAATATGGACATATCAGCTTTGACACACTGGG | ||
TTAAGGCGTAGGGTAGAGACGGAGTCCCTTCGCTGCCAATGTGGTGGTTTGGGACGAGTA | ||
TCATGTTGGTGCCCCAAGTTAACTTACTCCGCCCATGTCGTGCGATTACGCGAGAGTAGT | ||
AGATCGCTACGAGTATGTCCTCGGTGATCTAGTTAACTACTGTTACTGATGTCCGTTGCT | ||
CCACAGGTATACTCGGACACAATTCACGGGCTCCTCAAGCATACTAAAGAAGTCACGAGT | ||
GACGTCGGCGTAACCTCACATTAGTGGAGGAACCCGTGTGGAACATCATTCTAACGACAC | ||
TGTCGATCCCGGATGGATATGGTAGTCTTGATTATCCAGAGTCTTAGAGACATGGTAAGT | ||
TAGGAGCGCAGGACCATCAACTCTACTTTCCGGCAAATGTTAAGGGGTTTTGCTGACCAC | ||
CCGCATGCTTACAGTCCCGTTTCGCTAAGGTCTTCCTCGCTGCCTCTAGTTTTAGCGGAC | ||
GTTCCTTTCTCAACTAGTCTATTTGTTCATACTCATTTGGCACAGGTCTGTGTACGTCTA | ||
TCATGCGGACTAAATTACCCACAGAATGTCACAGGACAACATAGTGTTCATCATCCCTGT | ||
GGGATAACCGGTTACCTCGGATGAGGAGTATGAACTATATCTTAGCGTAGACCGATGTAT | ||
GGAAAGGCGCAGCCTCTGGCCGCCCACTATCGGAAATCGT |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
rand1k 1000 9 60 61 |
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright 2024 WHERE TRUE Technologies. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
use exon::datasources::cram; | ||
use noodles::core::Region; | ||
use pyo3::{pyclass, pymethods, PyResult}; | ||
|
||
use super::parse_region; | ||
|
||
#[pyclass] | ||
#[derive(Debug, Clone, Default)] | ||
pub struct CRAMReadOptions { | ||
region: Option<Region>, | ||
fasta_reference: Option<String>, | ||
} | ||
|
||
#[pymethods] | ||
impl CRAMReadOptions { | ||
#[new] | ||
pub fn try_new(region: Option<String>, fasta_reference: Option<String>) -> PyResult<Self> { | ||
let region = parse_region(region)?; | ||
|
||
Ok(Self { | ||
region, | ||
fasta_reference, | ||
}) | ||
} | ||
} | ||
|
||
impl From<CRAMReadOptions> for cram::table_provider::ListingCRAMTableOptions { | ||
fn from(options: CRAMReadOptions) -> Self { | ||
let mut t = cram::table_provider::ListingCRAMTableOptions::default() | ||
.with_fasta_reference(options.fasta_reference); | ||
|
||
if let Some(region) = options.region { | ||
t = t.with_region(Some(region)).with_indexed(true); | ||
} | ||
|
||
t | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2024 WHERE TRUE Technologies. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
use exon::datasources::fcs::table_provider::ListingFCSTableOptions; | ||
use pyo3::{pyclass, pymethods}; | ||
|
||
use crate::FileCompressionType; | ||
|
||
#[pyclass] | ||
#[derive(Debug, Clone, Default)] | ||
pub struct FCSReadOptions { | ||
// File compression type | ||
file_compression_type: FileCompressionType, | ||
} | ||
|
||
#[pymethods] | ||
impl FCSReadOptions { | ||
#[new] | ||
pub fn new(file_compression_type: Option<FileCompressionType>) -> Self { | ||
Self { | ||
file_compression_type: file_compression_type.unwrap_or_default(), | ||
} | ||
} | ||
} | ||
|
||
impl From<FCSReadOptions> for ListingFCSTableOptions { | ||
fn from(options: FCSReadOptions) -> Self { | ||
ListingFCSTableOptions::default() | ||
.with_file_compression_type(options.file_compression_type.into()) | ||
} | ||
} |
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