Skip to content

Commit

Permalink
sort transcripts in transcript_infos, make split-seq fwd strand, upda…
Browse files Browse the repository at this point in the history
…te CI
  • Loading branch information
Yenaled committed Nov 21, 2023
1 parent 6662460 commit 24eaaa7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python: [3.6, 3.7, 3.8, 3.9]
python: [3.7, 3.8, 3.9]
os: [ubuntu-20.04]
name: Test on Python ${{ matrix.python }}
steps:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/
.vscode
.vscode
ngs_tools/.DS_Store
.DS_Store
2 changes: 1 addition & 1 deletion ngs_tools/chemistry/SingleCellChemistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def whitelist_path(self) -> str:
name='SPLiT-seq',
description='Rosenberg et al. 2018',
n=2,
strand=SequencingStrand.UNSTRANDED,
strand=SequencingStrand.FORWARD,
cdna_parser=SubSequenceParser(SubSequenceDefinition(0)),
cell_barcode_parser=SubSequenceParser(
SubSequenceDefinition(1, 10, 8),
Expand Down
6 changes: 4 additions & 2 deletions ngs_tools/fasta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ def split_genomic_fasta_to_cdna(
for gene_id, gene_attributes in gene_infos.items():
if gene_attributes['chromosome'] == entry.name:
_gene_infos[gene_id] = gene_attributes
all_transcripts = sorted(gene_attributes['transcripts'])
_transcript_infos.update({
transcript_id: transcript_infos[transcript_id]
for transcript_id in gene_attributes['transcripts']
for transcript_id in all_transcripts
})

# Write all transcripts as separate FASTA entries.
Expand Down Expand Up @@ -107,9 +108,10 @@ def split_genomic_fasta_to_intron(
for gene_id, gene_attributes in gene_infos.items():
if gene_attributes['chromosome'] == entry.name:
_gene_infos[gene_id] = gene_attributes
all_transcripts = sorted(gene_attributes['transcripts'])
_transcript_infos.update({
transcript_id: transcript_infos[transcript_id]
for transcript_id in gene_attributes['transcripts']
for transcript_id in all_transcripts
})

# Write all transcripts as separate FASTA entries.
Expand Down

0 comments on commit 24eaaa7

Please sign in to comment.