Skip to content
Snippets Groups Projects

add a command line argument to extract part of hdf5 files

Closed Hanna JULIENNE requested to merge extract_csv into master
2 files
+ 63
4
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -35,16 +35,22 @@ By default, all the traits will have the same weight.
@@ -35,16 +35,22 @@ By default, all the traits will have the same weight.
If the user wishes to, she/he can specify a vector of weight by using the --custom-loadings option.
If the user wishes to, she/he can specify a vector of weight by using the --custom-loadings option.
Access HDFStore components
Extract HDFStore components to tsv files
--------------------------
----------------------------------------
To access each table of the HDFStore you can use `pandas read_hdf functions <https://pandas.pydata.org/docs/reference/api/pandas.read_hdf.html>`_ :
Each table of the HDFStore is accessible through the command line tool `jass extract-tsv` (see command line reference for complete details).
 
 
.. code-block:: shell
 
 
jass extract-tsv --hdf5-table-path ./initTable.hdf5 --tsv-path './test_extract.tsv' --table-key SumStatTab
 
 
alternately, you can use directly `pandas read_hdf functions <https://pandas.pydata.org/docs/reference/api/pandas.read_hdf.html>`_ :
For instance if you want to access the Regions table :
For instance if you want to access the Regions table :
.. code-block:: python
.. code-block:: python
pd.read_hdf("WK_test.hdf5", "Regions")
pd.read_hdf("WK_test.hdf5", "Regions")
Note that is you wish that the SumStatTab table to be saved as a csv file you can provide the command lines
Note that is you wish that the SumStatTab table to be saved as a csv file you can provide the command lines
with the --csv-file-path option and a csv will be generated as well. Outputting a csv while lengthen execution
with the --csv-file-path option and a csv will be generated as well. Outputting a csv while lengthen execution
@@ -54,5 +60,7 @@ Command Line example
@@ -54,5 +60,7 @@ Command Line example
--------------------
--------------------
See command line usage for details
See command line usage for details
 
.. code-block:: shell
.. code-block:: shell
 
jass create-project-data --init-table-path init_table/init_table_EUR_not_imputed.hdf5 --phenotype z_MAGIC_GLUCOSE-TOLERANCE z_MAGIC_FAST-GLUCOSE z_MAGIC_FAST-INSULIN z_MAGIC_HBA1C --worktable-path ./work_glycemic.hdf5 --manhattan-plot-path ./manhattan_glycemic.png --quadrant-plot-path ./quadrant_glycemic.png
jass create-project-data --init-table-path init_table/init_table_EUR_not_imputed.hdf5 --phenotype z_MAGIC_GLUCOSE-TOLERANCE z_MAGIC_FAST-GLUCOSE z_MAGIC_FAST-INSULIN z_MAGIC_HBA1C --worktable-path ./work_glycemic.hdf5 --manhattan-plot-path ./manhattan_glycemic.png --quadrant-plot-path ./quadrant_glycemic.png
Loading