Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed parser #5

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .DS_Store
Empty file.
4 changes: 2 additions & 2 deletions cfg.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config-yaml:
path-settings:
reference-directory: /gpfs/data/shared/databases/refchef_refs
git-directory: /gpfs/data/shared/databases/cbc-references-refchef
reference-directory: /oscar/data/shared/databases/refchef_refs
git-directory: /oscar/data/shared/databases/refchef_staging/cbc-references-refchef
remote-repository: compbiocore/cbc-references-refchef
log-settings:
log: 'yes'
214 changes: 214 additions & 0 deletions logs/refchef_20240806_104132.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
2024-08-06 10:41:32,450 INFO:
===========================================
REFCHEF 🐶
-------------------------------------------
- References will be downloaded to: /oscar/data/shared/databases/refchef_refs
- Remote repository for master.yaml compbiocore/cbc-references-refchef
- Local repository for master.yaml /oscar/data/shared/databases/refchef_staging/cbc-references-refchef
- Logs files: /oscar/data/shared/databases/refchef_staging/cbc-references-refchef/logs/
-------------------------------------------

2024-08-06 10:41:32,450 DEBUG: parse kwarg method: 2 ...
2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,964 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:34,965 INFO:
No references to download.

2024-08-06 10:41:35,406 INFO: References processed: ['spur31', 'cdubliniensis_cd36', 'broad_bundle_hg19', 'drosophila-melanogaster-bdgp6rel9', 'wbps8_ws256', 'grch37_release87', 'grcm38_p5', 'nt_db', 'nr_db', 'Escherichia_coli_K12', 'grch38_release98', 'saccer3', 'spur42', 'spur50', 'grcm38_p6', 'refseq_genomic', 'refseq_rna', 'refseq_protein', 'pr2_db', 'OM-RGC', 'silva_arbfiles', 'uniprot', 'rnor60', 'Genbank_UniVec_2018_11_28', 'Genbank_bacteria_all_2018_11_20_15_34_part1', 'Genbank_bacteria_all_2018_11_20_15_34_part2', 'Genbank_bacteria_all_2018_11_20_15_34_part3', 'cellranger_mm10', 'S_scrofa', 'alphafold_data', 'GRCm38_gencode']
2024-08-06 10:41:35,406 INFO: Location of references: /oscar/data/shared/databases/refchef_refs
1 change: 0 additions & 1 deletion master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9128,4 +9128,3 @@ alphafold_data:
files:
- metadata.txt
uuid: af939b94-b1ec-11ec-ac1a-ac1f6b1b78c8

24 changes: 24 additions & 0 deletions new_parsed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
GRCm38_gencode:
metadata:
name: GRCm38_gencode
common_name: mouse
custom: 'No'
description: Gencode mouse genome GRCm38 release M25 primary assembly
downloader: joselynn wallace
ncbi_taxon_id: null
ensembl_release_number: null
accession:
genbank: none
refseq: none
organism: Mus musculus
organization: gencode
category: genomics
levels:
annotations:
- component: null
complete:
status: 'false'
commands:
- wget https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M25/gencode.vM25.basic.annotation.gtf.gz
- gunzip -c gencode.vM25.basic.annotation.gtf.gz > gencode.vM25.basic.annotation.gtf
- md5sum *.gtf > final_checksums.md5
1 change: 1 addition & 0 deletions new_ref.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"What is your email address?":"[email protected]","name":"GRCm38_gencode","organism":"Mus musculus","common":"mouse","taxon":"10090","organization":"gencode","description":"Gencode mouse genome GRCm38 release M25 primary assembly","genbank":"none","refseq":"none","ensembl":"none","custom":"No","category":"genomics","level":"annotations","annotations_component":"GTF","Commands":"wget https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M25/gencode.vM25.basic.annotation.gtf.gz\ngunzip -c gencode.vM25.basic.annotation.gtf.gz > gencode.vM25.basic.annotation.gtf\nmd5sum *.gtf > final_checksums.md5"}
9 changes: 5 additions & 4 deletions parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

import json
import re

import oyaml as yaml

Expand All @@ -9,7 +9,8 @@
datajson = json.loads(data)
# if yaml_level is indices,
yaml_level = datajson.get('level')
yaml_commands = datajson.get('Commands')
yaml_commands = datajson.get('Commands').rstrip()
commands = re.split('\n|, ', yaml_commands)
if 'src' in datajson:
yaml_dict = {
datajson.get('name'):
Expand All @@ -36,7 +37,7 @@
'complete':
{'status': 'false'},
'src': datajson.get('src'),
'commands': datajson.get('Commands').split(', ')
'commands': commands
}
]
}
Expand Down Expand Up @@ -67,7 +68,7 @@
'component': datajson.get('component'),
'complete':
{'status': 'false'},
'commands': datajson.get('Commands').split(', ')
'commands': commands
}
]
}
Expand Down