Skip to content

Commit

Permalink
Merge pull request #759 from uclahs-cds/czhu-fix-index
Browse files Browse the repository at this point in the history
GTF source not written to index files
  • Loading branch information
lydiayliu authored Jul 4, 2023
2 parents f107557 + a523c63 commit 8cdca92
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion moPepGen/cli/generate_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def index_gtf(file:Path, source:str=None, proteome:aa.AminoAcidSeqDict=None,
anno.check_protein_coding(proteome, invalid_protein_as_noncoding)

gene_idx_file, tx_idx_file = anno.get_index_files(file)
metadata = GTFIndexMetadata()
metadata = GTFIndexMetadata(source=anno.source)

with open(gene_idx_file, 'wt') as handle:
metadata.write(handle)
Expand Down
4 changes: 2 additions & 2 deletions test/files/annotation_gene.idx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
##source=None
##source=GENCODE
##python=3.8.17
##moPepGen=1.1.0
##biopython=1.81
ENSG00000128408.9 0 174 ENST00000614168.2,ENST00000614167.2
ENSG00000128408.9 0 174 ENST00000614167.2,ENST00000614168.2
ENSG00000244486.9 12491 12694 ENST00000622235.5
ENSG00000099949.21 24586 24955 ENST00000642151.1
ENSG00000279973.2 27280 27432 ENST00000624155.2
2 changes: 1 addition & 1 deletion test/files/annotation_tx.idx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##source=None
##source=GENCODE
##python=3.8.17
##moPepGen=1.1.0
##biopython=1.81
Expand Down

0 comments on commit 8cdca92

Please sign in to comment.