Skip to content

Commit

Permalink
add templates
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhang committed Sep 30, 2024
1 parent e7f7177 commit 7487d84
Show file tree
Hide file tree
Showing 3 changed files with 237 additions and 2 deletions.
1 change: 1 addition & 0 deletions python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ crate-type = ["cdylib"]
anyhow = "1.0"
bwa-mem2 = { git = "https://github.com/regulatory-genomics/bwa-mem2-rust.git", rev = "07eda9b9c2815ae52b3fa30b01de0e19fae31fe0" }
bstr = "1.0"
cached-path = "0.6"
either = "1.13"
itertools = "0.13"
noodles = { version = "0.80", features = ["core", "fastq", "bam", "sam", "bgzf"] }
Expand Down
7 changes: 5 additions & 2 deletions python/src/pyseqspec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use pyo3::prelude::*;
use seqspec::{Assay, File, Modality, Read, Region, Strand, UrlType};
use anyhow::Result;
use termtree::Tree;
use cached_path::Cache;

/** A SeqSpec object.
Expand All @@ -17,7 +18,7 @@ use termtree::Tree;
Parameters
----------
path
Path to the AnnData file.
The local path or url to the seqspec file.
See Also
--------
Expand All @@ -32,7 +33,9 @@ impl SeqSpec {
#[new]
#[pyo3(signature = (path))]
pub fn new(path: &str) -> Result<Self> {
let assay = Assay::from_path(path)?;
let cache = Cache::new()?;
let file = cache.cached_path(path)?;
let assay = Assay::from_path(file)?;
Ok(SeqSpec(assay))
}

Expand Down
231 changes: 231 additions & 0 deletions seqspec_templates/10x_rna_atac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
!Assay
seqspec_version: 0.3.0
assay_id: 10xMultiome
name: 10x-ATAC-RNA
doi: https://www.globenewswire.com/en/news-release/2020/09/15/2093690/0/en/10x-Genomics-First-to-Market-With-Product-to-Simultaneously-Capture-Epigenome-and-Transcriptome.html
date: 15 September 2020
description: Single Cell Multiome ATAC + Gene Expression
modalities:
- rna
- atac
lib_struct: https://teichlab.github.io/scg_lib_structs/methods_html/10xChromium_multiome.html
library_protocol: Any
library_kit: Illumina Truseq Dual Index
sequence_protocol: Illumina NovaSeq 6000
sequence_kit: NovaSeq 6000 v1.5
sequence_spec: []
library_spec:
- !Region
parent_id: null
region_id: rna
region_type: rna
name: 10x-ATAC-RNA-MULTI-seq RNA
sequence_type: joined
sequence: AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCTNNNNNNNNNNNNNNNNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXAGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNNNATCTCGTATGCCGTCTTCTGCTTG
min_len: 153
max_len: 250
onlist: null
regions:
- !Region
parent_id: rna
region_id: rna-illumina_p5
region_type: illumina_p5
name: Illumina P5
sequence_type: fixed
sequence: AATGATACGGCGACCACCGAGATCTACAC
min_len: 29
max_len: 29
onlist: null
regions: null
- !Region
parent_id: rna
region_id: rna-truseq_read1
region_type: truseq_read1
name: RNA Truseq Read 1
sequence_type: fixed
sequence: TCTTTCCCTACACGACGCTCTTCCGATCT
min_len: 29
max_len: 29
onlist: null
regions: null
- !Region
parent_id: rna
region_id: rna-cell_barcode
region_type: barcode
name: Cell Barcode
sequence_type: onlist
sequence: NNNNNNNNNNNNNNNN
min_len: 16
max_len: 16
onlist: !Onlist
file_id: gex_737K-arc-v1.txt.gz
filename: gex_737K-arc-v1.txt.gz
filetype: txt
filesize: 0
url: https://teichlab.github.io/scg_lib_structs/data/10X-Genomics/gex_737K-arc-v1.txt.gz
urltype: https
md5: 0
location: local
regions: null
- !Region
region_id: rna-umi
region_type: umi
name: GEX UMI
sequence_type: random
sequence: XXXXXXXXXXXX
min_len: 12
max_len: 12
onlist: null
regions: null
parent_id: rna
- !Region
parent_id: rna
region_id: rna-cDNA
region_type: cdna
name: RNA-cDNA
sequence_type: random
sequence: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
min_len: 1
max_len: 98
onlist: null
regions: null
- !Region
parent_id: rna
region_id: rna-truseq_read2
region_type: truseq_read2
name: Truseq Read 2
sequence_type: fixed
sequence: AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC
min_len: 34
max_len: 34
onlist: null
regions: null
- !Region
parent_id: rna
region_id: rna-index7
region_type: index7
name: Truseq Read 2
sequence_type: onlist
sequence: NNNNNNNN
min_len: 8
max_len: 8
onlist: null
regions: null
- !Region
parent_id: rna
region_id: rna-illumina_p7
region_type: illumina_p7
name: Illumina P7
sequence_type: fixed
sequence: ATCTCGTATGCCGTCTTCTGCTTG
min_len: 24
max_len: 24
onlist: null
regions: null
- !Region
parent_id: null
region_id: atac
region_type: atac
name: ATAC
sequence_type: joined
sequence: AATGATACGGCGACCACCGAGATCTACACNNNNNNNNNNNNNNNNCGCGTCTGTCGTCGGCAGCGTCAGATGTGTATAAGAGACAGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXCTGTCTCTTATACACATCTCCGAGCCCACGAGACNNNNNNNNATCTCGTATGCCGTCTTCTGCTTG
min_len: 153
max_len: 250
onlist: null
regions:
- !Region
parent_id: atac
region_id: atac-illumina_p5
region_type: illumina_p5
name: Illumina P5
sequence_type: fixed
sequence: AATGATACGGCGACCACCGAGATCTACAC
min_len: 29
max_len: 29
onlist: null
regions: null
- !Region
parent_id: atac
region_id: atac-cell_barcode
region_type: barcode
name: R2 Cell Barcode
sequence_type: onlist
sequence: NNNNNNNNNNNNNNNN
min_len: 16
max_len: 16
onlist: !Onlist
file_id: atac_737K-arc-v1.txt.gz
filename: atac_737K-arc-v1.txt.gz
filetype: txt
filesize: 0
url: https://teichlab.github.io/scg_lib_structs/data/10X-Genomics/atac_737K-arc-v1.txt.gz
urltype: https
md5: 0
location: remote
regions: null
- !Region
parent_id: atac
region_id: atac-linker
region_type: linker
name: atac linker
sequence_type: fixed
sequence: CGCGTCTG
min_len: 8
max_len: 8
onlist: null
regions: null
- !Region
parent_id: atac
region_id: atac-nextera_read1
region_type: nextera_read1
name: nextera_read1
sequence_type: fixed
sequence: TCGTCGGCAGCGTCAGATGTGTATAAGAGACAG
min_len: 33
max_len: 33
onlist: null
regions: null
- !Region
parent_id: atac
region_id: gDNA
region_type: gdna
name: gDNA
sequence_type: random
sequence: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
min_len: 1
max_len: 98
onlist: null
regions: null
- !Region
parent_id: atac
region_id: atac-nextera_read2
region_type: nextera_read2
name: nextera_read2
sequence_type: fixed
sequence: CTGTCTCTTATACACATCTCCGAGCCCACGAGAC
min_len: 34
max_len: 34
onlist: null
regions: null
- !Region
parent_id: atac
region_id: atac-index7
region_type: index7
name: ATAC index7
sequence_type: onlist
sequence: NNNNNNNN
min_len: 8
max_len: 8
onlist: null
regions: null
- !Region
parent_id: atac
region_id: atac-illumina_p7
region_type: illumina_p7
name: Illumina P7
sequence_type: fixed
sequence: ATCTCGTATGCCGTCTTCTGCTTG
min_len: 24
max_len: 24
onlist: null
regions: null

0 comments on commit 7487d84

Please sign in to comment.