Skip to content

Commit

Permalink
Kvg mas16 (#194)
Browse files Browse the repository at this point in the history
* Added MAS16 model to preconfigured model list
  • Loading branch information
kvg authored Nov 24, 2022
1 parent 7bdff93 commit 4cd42b5
Show file tree
Hide file tree
Showing 8 changed files with 559 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
# Run test suite
test_suite:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- name: Work around permissions issue
Expand Down
2 changes: 1 addition & 1 deletion src/longbow/utils/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ def get_field_count_and_percent_string(count, total, fformat="2.4f"):


def zero_safe_div(n, d):
return 0 if d else n/d
return 0 if not d else n/d
27 changes: 27 additions & 0 deletions src/longbow/utils/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,33 @@ def connect_terminals(base_hmm, adapter_name_i, adapter_name_j, transition_proba

pre_configured_models = {
'array': {
"mas_16": {
"description": "16-element MAS-ISO-seq array",
"version": "3.0.0",
"structure": ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q"],
"adapters": {
"A": "AGCTTACTTGTGAAGA",
"B": "ACTTGTAAGCTGTCTA",
"C": "ACTCTGTCAGGTCCGA",
"D": "ACCTCCTCCTCCAGAA",
"E": "AACCGGACACACTTAG",
"F": "AGAGTCCAATTCGCAG",
"G": "AATCAAGGCTTAACGG",
"H": "ATGTTGAATCCTAGCG",
"I": "AGTGCGTTGCGAATTG",
"J": "AATTGCGTAGTTGGCC",
"K": "ACACTTGGTCGCAATC",
"L": "AGTAAGCCTTCGTGTC",
"M": "ACCTAGATCAGAGCCT",
"N": "AGGTATGCCGGTTAAG",
"O": "AAGTCACCGGCACCTT",
"P": "ATGAAGTGGCTCGAGA",
"Q": "AGTAGCTGTGTGCA",
},
"deprecated": False,
"name": "mas_16",
},

"mas_15": {
"description": "15-element MAS-ISO-seq array",
"version": "3.0.0",
Expand Down
106 changes: 106 additions & 0 deletions tests/test_data/models/mas_16+bulk_10x5p.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"name": "mas_16+bulk_10x5p",
"description": "16-element MAS-ISO-seq array, bulk 10x 5' kit",
"array": {
"description": "16-element MAS-ISO-seq array",
"version": "3.0.0",
"structure": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q"
],
"adapters": {
"A": "AGCTTACTTGTGAAGA",
"B": "ACTTGTAAGCTGTCTA",
"C": "ACTCTGTCAGGTCCGA",
"D": "ACCTCCTCCTCCAGAA",
"E": "AACCGGACACACTTAG",
"F": "AGAGTCCAATTCGCAG",
"G": "AATCAAGGCTTAACGG",
"H": "ATGTTGAATCCTAGCG",
"I": "AGTGCGTTGCGAATTG",
"J": "AATTGCGTAGTTGGCC",
"K": "ACACTTGGTCGCAATC",
"L": "AGTAAGCCTTCGTGTC",
"M": "ACCTAGATCAGAGCCT",
"N": "AGGTATGCCGGTTAAG",
"O": "AAGTCACCGGCACCTT",
"P": "ATGAAGTGGCTCGAGA",
"Q": "AGTAGCTGTGTGCA"
},
"deprecated": false,
"name": "mas_16"
},
"cdna": {
"description": "bulk 10x 5' kit",
"version": "3.0.0",
"structure": [
"5p_Adapter",
"UMI",
"SLS",
"cDNA",
"Poly_A",
"sample_index",
"3p_Adapter"
],
"adapters": {
"5p_Adapter": "TCTACACGACGCTCTTCCGATCT",
"UMI": {
"FixedLengthRandomBases": 10
},
"SLS": "TTTCTTATATGGG",
"cDNA": "random",
"Poly_A": {
"HomopolymerRepeat": [
"A",
30
]
},
"sample_index": {
"FixedLengthRandomBases": 10
},
"3p_Adapter": "CTCTGCGTTGATACCACTGCTT"
},
"named_random_segments": [
"UMI",
"cDNA",
"sample_index"
],
"coding_region": "cDNA",
"annotation_segments": {
"UMI": [
[
"ZU",
"XU"
],
[
"XM",
"XU"
]
],
"sample_index": [
[
"id",
"ip"
]
]
},
"deprecated": false,
"name": "bulk_10x5p"
}
}

89 changes: 89 additions & 0 deletions tests/test_data/models/mas_16+bulk_teloprimeV2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"name": "mas_16+bulk_teloprimeV2",
"description": "16-element MAS-ISO-seq array, Lexogen TeloPrime V2 kit",
"array": {
"description": "16-element MAS-ISO-seq array",
"version": "3.0.0",
"structure": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q"
],
"adapters": {
"A": "AGCTTACTTGTGAAGA",
"B": "ACTTGTAAGCTGTCTA",
"C": "ACTCTGTCAGGTCCGA",
"D": "ACCTCCTCCTCCAGAA",
"E": "AACCGGACACACTTAG",
"F": "AGAGTCCAATTCGCAG",
"G": "AATCAAGGCTTAACGG",
"H": "ATGTTGAATCCTAGCG",
"I": "AGTGCGTTGCGAATTG",
"J": "AATTGCGTAGTTGGCC",
"K": "ACACTTGGTCGCAATC",
"L": "AGTAAGCCTTCGTGTC",
"M": "ACCTAGATCAGAGCCT",
"N": "AGGTATGCCGGTTAAG",
"O": "AAGTCACCGGCACCTT",
"P": "ATGAAGTGGCTCGAGA",
"Q": "AGTAGCTGTGTGCA"
},
"deprecated": false,
"name": "mas_16"
},
"cdna": {
"description": "Lexogen TeloPrime V2 kit",
"version": "3.0.0",
"structure": [
"TPV2_adapter",
"cDNA",
"Poly_A",
"idx",
"rev_bind"
],
"adapters": {
"TPV2_adapter": "CTACACGACGCTCTTCCGATCTTGGATTGATATGTAATACGACTCACTATAG",
"cDNA": "random",
"Poly_A": {
"HomopolymerRepeat": [
"A",
30
]
},
"idx": {
"FixedLengthRandomBases": 10
},
"rev_bind": "CTCTGCGTTGATACCACTGCTT"
},
"named_random_segments": [
"idx",
"cDNA"
],
"coding_region": "cDNA",
"annotation_segments": {
"idx": [
[
"BC",
"XB"
]
]
},
"deprecated": false,
"name": "bulk_teloprimeV2"
}
}

108 changes: 108 additions & 0 deletions tests/test_data/models/mas_16+sc_10x3p.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"name": "mas_16+sc_10x3p",
"description": "16-element MAS-ISO-seq array, single-cell 10x 3' kit",
"array": {
"description": "16-element MAS-ISO-seq array",
"version": "3.0.0",
"structure": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q"
],
"adapters": {
"A": "AGCTTACTTGTGAAGA",
"B": "ACTTGTAAGCTGTCTA",
"C": "ACTCTGTCAGGTCCGA",
"D": "ACCTCCTCCTCCAGAA",
"E": "AACCGGACACACTTAG",
"F": "AGAGTCCAATTCGCAG",
"G": "AATCAAGGCTTAACGG",
"H": "ATGTTGAATCCTAGCG",
"I": "AGTGCGTTGCGAATTG",
"J": "AATTGCGTAGTTGGCC",
"K": "ACACTTGGTCGCAATC",
"L": "AGTAAGCCTTCGTGTC",
"M": "ACCTAGATCAGAGCCT",
"N": "AGGTATGCCGGTTAAG",
"O": "AAGTCACCGGCACCTT",
"P": "ATGAAGTGGCTCGAGA",
"Q": "AGTAGCTGTGTGCA"
},
"deprecated": false,
"name": "mas_16"
},
"cdna": {
"description": "single-cell 10x 3' kit",
"version": "3.0.0",
"structure": [
"5p_Adapter",
"CBC",
"UMI",
"Poly_T",
"cDNA",
"3p_Adapter"
],
"adapters": {
"5p_Adapter": "TCTACACGACGCTCTTCCGATCT",
"CBC": {
"FixedLengthRandomBases": 16
},
"UMI": {
"FixedLengthRandomBases": 12
},
"Poly_T": {
"HomopolymerRepeat": [
"T",
30
]
},
"cDNA": "random",
"3p_Adapter": "CCCATGTACTCTGCGTTGATACCACTGCTT"
},
"named_random_segments": [
"CBC",
"UMI",
"cDNA"
],
"coding_region": "cDNA",
"annotation_segments": {
"UMI": [
[
"ZU",
"XU"
],
[
"XM",
"XU"
]
],
"CBC": [
[
"CR",
"XB"
],
[
"XC",
"XB"
]
]
},
"deprecated": false,
"name": "sc_10x3p"
}
}

Loading

0 comments on commit 4cd42b5

Please sign in to comment.