Skip to content
Snippets Groups Projects
Commit cba0b659 authored by Hanna  JULIENNE's avatar Hanna JULIENNE
Browse files

Revert "hdf5 add attributes"

This reverts commit 36d25d6c
parent 36d25d6c
No related branches found
No related tags found
No related merge requests found
import h5py
# we need python package h5py to read/write .hdf5 file
def add_title_description(title, description, filename):
f = h5py.File(filename, "a")
f.attrs['title'] = title
f.attrs['description'] = description
f.close()
if __name__ == "__main__":
title = 'Curated GWAS summary statistics on African ancestry on 19 blood count traits and glycemic traits (hg38)'
des = 'Genome wide curated summary statistics on 19 blood count traits and glycemic traits' \
'File format is the inittable format intended to be used with the Joint Analysis of Summary Statistics (JASS), which allows to perform multi-trait GWAS:' \
'https://gitlab.pasteur.fr/statistical-genetics/jass' \
'GWAS of hematological traits originate from Chen et al paper and were downloaded from the GWAS Catalog (https://www.ebi.ac.uk/gwas/publications/32888493#study_panel). GWAS of glycemic traits come from the (18) study downloadable from GWAS Catalog (https://www.ebi.ac.uk/gwas/publications/34059833).'
hdf5_file = 'test.hdf5'
add_title_description(title=title, description=des, filename=hdf5_file)
f = h5py.File(hdf5_file, "r")
print(f.attrs['title'])
print(f.attrs['description'])
f.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment