py-cmdtabs 1.2.0__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/PKG-INFO +5 -1
  2. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/README.rst +4 -1
  3. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/setup.cfg +3 -0
  4. py_cmdtabs-1.2.2/src/py_cmdtabs/__init__.py +16 -0
  5. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/src/py_cmdtabs/cli_manager.py +142 -13
  6. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/src/py_cmdtabs/cmdtabs.py +240 -75
  7. py_cmdtabs-1.2.2/src/py_cmdtabs/main_modules.py +336 -0
  8. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/src/py_cmdtabs.egg-info/PKG-INFO +5 -1
  9. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/src/py_cmdtabs.egg-info/SOURCES.txt +20 -3
  10. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/src/py_cmdtabs.egg-info/entry_points.txt +2 -0
  11. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/src/py_cmdtabs.egg-info/requires.txt +1 -0
  12. py_cmdtabs-1.2.2/src/py_cmdtabs.egg-info/scm_file_list.json +199 -0
  13. py_cmdtabs-1.2.2/src/py_cmdtabs.egg-info/scm_version.json +8 -0
  14. py_cmdtabs-1.2.2/tests/cli_example_report/Report.html +4706 -0
  15. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/launch.sh +1 -1
  16. py_cmdtabs-1.2.2/tests/cli_example_report/outputs/corrupted_table +1 -0
  17. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/outputs/wide_table +1 -1
  18. py_cmdtabs-1.2.2/tests/cli_example_report/styles.css +130 -0
  19. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/aggregate_column_data +52 -0
  20. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/column_filter +77 -0
  21. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/create_metric_table +27 -0
  22. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/desaggregate_column_data +24 -0
  23. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/excel_to_tabular +51 -0
  24. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/filter_by_list +61 -0
  25. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/get_columns +24 -0
  26. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/intersect_columns +46 -0
  27. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/merge_tabular +23 -0
  28. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/records_count +15 -0
  29. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/show_n_exec +48 -0
  30. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/sort_rows_by +53 -0
  31. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/standard_name_replacer +30 -0
  32. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/subset_table +42 -0
  33. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/table_linker +46 -0
  34. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/tag_table +36 -0
  35. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/transform_to_latex +24 -0
  36. py_cmdtabs-1.2.2/tests/cli_example_report/subtemplates/transpose_table +14 -0
  37. py_cmdtabs-1.2.2/tests/cli_example_report/tables/organization +9 -0
  38. py_cmdtabs-1.2.2/tests/cli_example_report/tables/pats_order +4 -0
  39. py_cmdtabs-1.2.2/tests/cli_example_report/tables/table_to_sort_2cols_header +5 -0
  40. py_cmdtabs-1.2.2/tests/cli_example_report/template.txt +82 -0
  41. py_cmdtabs-1.2.2/tests/data_tests/pats_order +3 -0
  42. py_cmdtabs-1.2.2/tests/data_tests/ref_output_scripts/table_to_sort_2cols_header +4 -0
  43. py_cmdtabs-1.2.2/tests/data_tests/ref_output_scripts/table_to_sort_header_by_cat +4 -0
  44. py_cmdtabs-1.2.2/tests/data_tests/ref_output_scripts/table_to_sort_header_by_pat +4 -0
  45. py_cmdtabs-1.2.2/tests/data_tests/ref_output_scripts/table_to_sort_header_by_score +4 -0
  46. py_cmdtabs-1.2.2/tests/data_tests/ref_output_scripts/table_to_sort_noheader_by_cat +3 -0
  47. py_cmdtabs-1.2.2/tests/data_tests/ref_output_scripts/table_to_sort_noheader_by_pat +3 -0
  48. py_cmdtabs-1.2.2/tests/data_tests/ref_output_scripts/table_to_sort_noheader_by_score +3 -0
  49. py_cmdtabs-1.2.2/tests/data_tests/table_to_sort_2cols_header +4 -0
  50. py_cmdtabs-1.2.2/tests/data_tests/table_to_sort_header +4 -0
  51. py_cmdtabs-1.2.2/tests/data_tests/table_to_sort_noheader +3 -0
  52. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/test_cli_manager.py +130 -50
  53. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/test_cmdtabs_lib.py +25 -14
  54. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/test_expanded_methods.py +2 -3
  55. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/test_input_parsing.py +60 -6
  56. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/test_io.py +2 -3
  57. py_cmdtabs-1.2.0/src/py_cmdtabs/__init__.py +0 -2
  58. py_cmdtabs-1.2.0/src/py_cmdtabs/main_modules.py +0 -245
  59. py_cmdtabs-1.2.0/tests/cli_example_report/Report.html +0 -3796
  60. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/aggregate_column_data +0 -55
  61. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/column_filter +0 -88
  62. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/create_metric_table +0 -50
  63. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/desaggregate_column_data +0 -25
  64. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/example +0 -64
  65. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/example_written +0 -71
  66. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/excel_to_tabular +0 -56
  67. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/filter_by_list +0 -64
  68. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/general +0 -41
  69. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/get_columns +0 -29
  70. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/intersect_columns +0 -59
  71. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/merge_tabular +0 -25
  72. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/records_count +0 -16
  73. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/standard_name_replacer +0 -35
  74. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/subset_table +0 -45
  75. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/table_linker +0 -47
  76. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/tag_table +0 -49
  77. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/transform_to_latex +0 -25
  78. py_cmdtabs-1.2.0/tests/cli_example_report/subtemplates/transpose_table +0 -16
  79. py_cmdtabs-1.2.0/tests/cli_example_report/template.txt +0 -104
  80. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/.readthedocs.yml +0 -0
  81. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/AUTHORS.rst +0 -0
  82. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/CHANGELOG.rst +0 -0
  83. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/CONTRIBUTING.rst +0 -0
  84. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/LICENSE.txt +0 -0
  85. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/docs/Makefile +0 -0
  86. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/docs/_static/.gitignore +0 -0
  87. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/docs/authors.rst +0 -0
  88. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/docs/changelog.rst +0 -0
  89. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/docs/conf.py +0 -0
  90. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/docs/contributing.rst +0 -0
  91. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/docs/index.rst +0 -0
  92. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/docs/license.rst +0 -0
  93. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/docs/readme.rst +0 -0
  94. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/docs/requirements.txt +0 -0
  95. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/make_package.sh +0 -0
  96. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/pyproject.toml +0 -0
  97. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/requirements.txt +0 -0
  98. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/setup.py +0 -0
  99. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/src/py_cmdtabs.egg-info/dependency_links.txt +0 -0
  100. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/src/py_cmdtabs.egg-info/not-zip-safe +0 -0
  101. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/src/py_cmdtabs.egg-info/top_level.txt +0 -0
  102. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/__init__.py +0 -0
  103. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/example +0 -0
  104. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/outputs/blackfiltered_long_table +0 -0
  105. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/outputs/filtered_long_table +0 -0
  106. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/outputs/ref_filtered_disease_cluster_ref_rnd +0 -0
  107. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/outputs/subset_table/disease_cluster_ref_rnd_chunk0 +0 -0
  108. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/outputs/subset_table/disease_cluster_ref_rnd_chunk1 +0 -0
  109. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/outputs/subset_table/disease_cluster_ref_rnd_chunk2 +0 -0
  110. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/outputs/subset_table2/disease_cluster_ref_rnd_chunk0 +0 -0
  111. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/outputs/subset_table2/disease_cluster_ref_rnd_chunk1 +0 -0
  112. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/special_files/hoja1.png +0 -0
  113. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/special_files/hoja2.png +0 -0
  114. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/special_files/scRNAseq.htm +0 -0
  115. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/special_files/scRNAseq.xlsx +0 -0
  116. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/special_files/scRNAseq_archivos/filelist.xml +0 -0
  117. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/special_files/scRNAseq_archivos/sheet001.htm +0 -0
  118. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/special_files/scRNAseq_archivos/sheet002.htm +0 -0
  119. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/special_files/scRNAseq_archivos/stylesheet.css +0 -0
  120. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/special_files/scRNAseq_archivos/tabstrip.htm +0 -0
  121. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/special_files/~$scRNAseq.xlsx +0 -0
  122. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/cluster_genes_dis_agg +0 -0
  123. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/cluster_genes_dis_agg2 +0 -0
  124. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/cluster_genes_dis_desagg +0 -0
  125. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/cluster_genes_dis_desagg_3cols +0 -0
  126. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/cluster_genes_dis_desagg_4cols +0 -0
  127. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/cluster_stats +0 -0
  128. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/clusts_to_filter +0 -0
  129. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/disease_cluster +0 -0
  130. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/disease_cluster_ref_rnd +0 -0
  131. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/disease_cluster_uniq +0 -0
  132. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/disease_gene +0 -0
  133. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/long_disease_cluster +0 -0
  134. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/long_table +0 -0
  135. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/metrics_table +0 -0
  136. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/mondo_to_orpha +0 -0
  137. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/nets_to_filter +0 -0
  138. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/simple_table +0 -0
  139. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/cli_example_report/tables/tracker +0 -0
  140. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/conftest.py +0 -0
  141. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/agg_2index_2values.txt +0 -0
  142. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/agg_data_3_columns.txt +0 -0
  143. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/all_metrics +0 -0
  144. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/blacklist +0 -0
  145. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/blacklist_partial +0 -0
  146. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/cluster_genes.xlsx +0 -0
  147. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/cluster_genes_dis_agg +0 -0
  148. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/cluster_genes_dis_desagg +0 -0
  149. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/cluster_stats +0 -0
  150. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/cluster_stats_header +0 -0
  151. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/dis_gene_attrs +0 -0
  152. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/disease_cluster +0 -0
  153. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/disease_cluster_uniq +0 -0
  154. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/disease_gene +0 -0
  155. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/filterlist +0 -0
  156. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/filterlist_partial +0 -0
  157. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/hp_long_list.txt +0 -0
  158. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ids2count +0 -0
  159. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ids2count_short +0 -0
  160. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/metric_table +0 -0
  161. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/mondo_genes +0 -0
  162. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/mondo_genes.gz +0 -0
  163. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/TEST_file +0 -0
  164. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/TEST_file_transposed +0 -0
  165. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/agg_2index_2values.txt +0 -0
  166. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/agg_2index_2values_several_aggregators.txt +0 -0
  167. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/agg_data_3_columns_result.txt +0 -0
  168. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/cluster_genes_dis_AGG +0 -0
  169. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/cluster_genes_dis_AGG_stdin +0 -0
  170. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/cluster_genes_dis_DESAGG +0 -0
  171. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/cluster_genes_dis_DESAGG_stdin +0 -0
  172. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/cluster_genes_from_excel.txt +0 -0
  173. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_hard +0 -0
  174. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_hard_various_keys +0 -0
  175. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_hard_various_keys_and_every_columns +0 -0
  176. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_hard_various_keys_and_every_columns_header +0 -0
  177. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_hard_various_keys_and_some_columns +0 -0
  178. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_soft +0 -0
  179. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_soft_1_column +0 -0
  180. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_soft_1_column_reverse +0 -0
  181. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_soft_1_column_uniq +0 -0
  182. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_soft_and_every_columns +0 -0
  183. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/column_matching_soft_and_some_columns +0 -0
  184. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/ids2count +0 -0
  185. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/intersect_columns_count +0 -0
  186. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/intersect_columns_default +0 -0
  187. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/intersect_columns_default_stdin_a +0 -0
  188. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/intersect_columns_default_stdin_b +0 -0
  189. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/intersect_columns_full +0 -0
  190. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/linked_table +0 -0
  191. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/linked_table3 +0 -0
  192. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/linked_table_2 +0 -0
  193. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/linked_table_matches +0 -0
  194. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/merge_disease_cluster_gene +0 -0
  195. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/metric_table +0 -0
  196. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/mondo_genes_transposed +0 -0
  197. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/mondo_genes_transposed.gz +0 -0
  198. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/replaced_name +0 -0
  199. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/replaced_name_untranslated +0 -0
  200. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/subset_table +0 -0
  201. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/subset_table_fold/mondo_genes_chunk0 +0 -0
  202. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/subset_table_fold/mondo_genes_chunk1 +0 -0
  203. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/subset_table_fold/mondo_genes_chunk2 +0 -0
  204. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/tag_table +0 -0
  205. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/tag_table_header +0 -0
  206. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/transposed_cluster_genes_dis_AGG +0 -0
  207. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/transposed_cluster_genes_dis_DESAGG +0 -0
  208. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/transposed_cluster_genes_from_excel.txt +0 -0
  209. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/transposed_column_matching_hard +0 -0
  210. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/transposed_intersect_columns_default +0 -0
  211. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/transposed_linked_table +0 -0
  212. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/transposed_merge_disease_cluster_gene +0 -0
  213. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/transposed_metric_table +0 -0
  214. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/transposed_replaced_name +0 -0
  215. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/ref_output_scripts/transposed_tag_table +0 -0
  216. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/simple_table +0 -0
  217. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/tracker +0 -0
  218. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/transposed/all_metrics +0 -0
  219. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/transposed/cluster_genes.xlsx +0 -0
  220. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/transposed/cluster_genes_dis_agg +0 -0
  221. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/transposed/cluster_genes_dis_desagg +0 -0
  222. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/transposed/cluster_stats +0 -0
  223. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/transposed/disease_cluster +0 -0
  224. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/transposed/disease_cluster_uniq +0 -0
  225. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/transposed/disease_gene +0 -0
  226. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/data_tests/transposed/tranpose_data.py +0 -0
  227. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tests/test_compressed_pipes.sh +0 -0
  228. {py_cmdtabs-1.2.0 → py_cmdtabs-1.2.2}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py_cmdtabs
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: Set of tools to facilitate parsing of tabulated files
5
5
  Home-page: https://github.com/seoanezonjic/py_cmdtabs
6
6
  Author: seoanezonjic
@@ -15,6 +15,7 @@ License-File: LICENSE.txt
15
15
  Requires-Dist: importlib-metadata; python_version < "3.8"
16
16
  Requires-Dist: openpyxl
17
17
  Requires-Dist: numpy
18
+ Requires-Dist: pandas
18
19
  Provides-Extra: testing
19
20
  Requires-Dist: setuptools; extra == "testing"
20
21
  Requires-Dist: pytest; extra == "testing"
@@ -71,3 +72,6 @@ py_cmdtabs includes tools that make it easier for its user to manipulate tabulat
71
72
  * Replace information: The standard_name_replacer.py script replaces values in a table based on a contributed value code.
72
73
  * Filter columns: The column_filter.py script filters columns from a tabulated file whose elements match a specified pattern.
73
74
  * Transform Excel format into tabular: the excel_to_tabular.py script transforms files with an .xlsx extension into tabular files and makes their handling easier.
75
+
76
+
77
+ See https://github.com/seoanezonjic/py_cmdtabs
@@ -47,4 +47,7 @@ py_cmdtabs includes tools that make it easier for its user to manipulate tabulat
47
47
  * Obtain common information: the table_linker.py script allows you to save in the same output file the information extracted from a tabulated file, based on the identifiers of a second file.
48
48
  * Replace information: The standard_name_replacer.py script replaces values in a table based on a contributed value code.
49
49
  * Filter columns: The column_filter.py script filters columns from a tabulated file whose elements match a specified pattern.
50
- * Transform Excel format into tabular: the excel_to_tabular.py script transforms files with an .xlsx extension into tabular files and makes their handling easier.
50
+ * Transform Excel format into tabular: the excel_to_tabular.py script transforms files with an .xlsx extension into tabular files and makes their handling easier.
51
+
52
+
53
+ See https://github.com/seoanezonjic/py_cmdtabs
@@ -25,6 +25,7 @@ install_requires =
25
25
  importlib-metadata; python_version<"3.8"
26
26
  openpyxl
27
27
  numpy
28
+ pandas
28
29
 
29
30
  [options.packages.find]
30
31
  where = src
@@ -39,6 +40,8 @@ testing =
39
40
 
40
41
  [options.entry_points]
41
42
  console_scripts =
43
+ cmdtabs = py_cmdtabs.cli_manager:cmdtabs
44
+ cmdtabs_merge = py_cmdtabs.cli_manager:cmdtabs_merge
42
45
  aggregate_column_data = py_cmdtabs.cli_manager:aggregate_column_data
43
46
  column_filter = py_cmdtabs.cli_manager:column_filter
44
47
  create_metric_table = py_cmdtabs.cli_manager:create_metric_table
@@ -0,0 +1,16 @@
1
+ import sys
2
+
3
+ if sys.version_info[:2] >= (3, 8):
4
+ # TODO: Import directly (no need for conditional) when `python_requires = >= 3.8`
5
+ from importlib.metadata import PackageNotFoundError, version # pragma: no cover
6
+ else:
7
+ from importlib_metadata import PackageNotFoundError, version # pragma: no cover
8
+
9
+ try:
10
+ # Change here if project is renamed and does not equal the package name
11
+ dist_name = __name__
12
+ __version__ = version(dist_name)
13
+ except PackageNotFoundError: # pragma: no cover
14
+ __version__ = "unknown"
15
+ finally:
16
+ del version, PackageNotFoundError
@@ -1,16 +1,14 @@
1
- import argparse
2
- import sys
3
- import os
4
- import codecs
5
-
6
- from py_cmdtabs.cmdtabs import CmdTabs
1
+ import argparse, sys, os, codecs
7
2
  from py_cmdtabs.main_modules import *
8
3
 
9
4
  ## TYPES
10
5
  def based_0(string): return int(string) - 1
11
- def list_based_0(string): return CmdTabs.parse_column_indices(",", string)
6
+ def list_based_0(string):
7
+ from py_cmdtabs.cmdtabs import CmdTabs
8
+ return CmdTabs.parse_column_indices(string.split(','))
12
9
  def list_str(values): return values.split(',')
13
10
  def unescaped_str(arg_str): return codecs.decode(str(arg_str), 'unicode_escape')
11
+ def nested_int_list(arg_str): return [ [int(col) - 1 for col in str_cols.split(',')] for str_cols in arg_str.split(';')]
14
12
 
15
13
  ## Common options
16
14
  def add_common_options(parser, flags_to_skip = [], help_replacer={}):
@@ -82,7 +80,7 @@ def create_metric_table(args=None):
82
80
  add_common_options(parser, flags_to_skip=["--input_file"])
83
81
  parser.add_argument("metric_file", metavar='M',
84
82
  help="File with tabulated metrics")
85
- parser.add_argument("attributes", metavar='A',
83
+ parser.add_argument("attributes", metavar='A', type=list_str,
86
84
  help="String with comma separated attributes")
87
85
  parser.add_argument("output_file", metavar='O',
88
86
  help="Output file path")
@@ -110,10 +108,10 @@ def excel_to_tabular(args=None):
110
108
  add_common_options(parser, flags_to_skip=["--compressed_in"], help_replacer={"--input_file": "Input xlsx file"})
111
109
  parser.add_argument("-o", "--output_file", dest="output_file",
112
110
  help="Path to output file")
113
- parser.add_argument("-c", "--columns2extract", dest="columns2extract", default=[0], type=list_based_0,
114
- help="Column position to extract (1 based). Default 1. Use 0 to extract all columns")
115
- parser.add_argument("-r", "--rows2extract", dest="rows2extract", default=[-1], type=list_based_0,
116
- help="Row positions to extract (1 based). Default 0, which means all rows will be extracted")
111
+ parser.add_argument("-c", "--columns2extract", dest="columns2extract", default=[], type=list_based_0,
112
+ help="Comma-separated column position(s) to extract (1 based). If not used, all columns will be extracted")
113
+ parser.add_argument("-r", "--rows2extract", dest="rows2extract", default=[], type=list_based_0,
114
+ help="Comma-separated row position(s) to extract (1 based). If not used, all rows will be extracted")
117
115
  parser.add_argument("-s", "--sheet_number", dest="sheet_number", default=0, type=based_0,
118
116
  help="Sheet number to work with. Default 1")
119
117
 
@@ -292,4 +290,135 @@ def transpose_table(args=None):
292
290
  parser.add_argument("-o", "--output_file", dest="output_file", default=None,
293
291
  help="Path to output file")
294
292
  opts = parser.parse_args(args)
295
- main_transpose_table(opts)
293
+ main_transpose_table(opts)
294
+
295
+ def cmdtabs(args=None):
296
+ if args == None: args = sys.argv[1:]
297
+ parser = argparse.ArgumentParser(description=f'Usage: {os.path.basename(__file__)} [options]')
298
+ add_common_options(parser)
299
+ parser.add_argument("-c", "--columns", dest="columns", default=[0], type=list_based_0,
300
+ help="Index of columns in base 1 to compare")
301
+ parser.add_argument("-H", "--header", dest="header", default=False, action='store_true',
302
+ help="Indicate if files have header")
303
+ parser.add_argument("-I", "--index_file", dest="index_file", default=None,
304
+ help="Path to index file")
305
+ parser.add_argument("-o", "--output_file", dest="output_file", default=None,
306
+ help="Path to output file")
307
+ parser.add_argument("-s", "--separator", dest="separator", default="\t", type=unescaped_str,
308
+ help="Input table column character separator")
309
+ parser.add_argument("-t", "--tags", dest="tags", default= [],
310
+ help="Strings or files (only first line will be used) sepparated by commas", type=list_str)
311
+ parser.add_argument("-u", "--remove_untranslated", dest="remove_untranslated", default=False, action='store_true',
312
+ help="Activate this flag for outputting the untranslated entries")
313
+ parser.add_argument("-w", "--whole", dest="whole", default=False, action='store_true',
314
+ help="Indicate if you want the whole table and tabular environment to be returned with the table transformed")
315
+
316
+ parser.add_argument("--aggregate", dest="aggregate", default=False, action='store_true',
317
+ help="Aggregate table columns")
318
+ parser.add_argument("--agg_ref_col_index", dest="agg_col_index",
319
+ help="Column index (1 based) to use as reference", type=list_based_0)
320
+ parser.add_argument("--agg_col", dest="col_aggregate",
321
+ help="Column(s) index (1 based) to extract data and join for each id in column index (if more than one, comma separated)", type=list_based_0)
322
+ parser.add_argument("--agg_mode", dest="agg_mode", default="concatenate",
323
+ help="Mode to perform aggregation. Current available: max,min,mean,median,sum,std,var,IQR,PC25,PC75,count & concatenate. Default (concatenate) is string concatenation by defined separator. More than one aggregation mode can be used separated by commas")
324
+ parser.add_argument("--agg_sep", dest="agg_sep", default=",",
325
+ help="Character separator when collapse data")
326
+ parser.add_argument("--count-cols", dest="count_cols", default=None, type=list_based_0,
327
+ help="Index of columns in base 1 to count")
328
+ parser.add_argument("--desaggregate", dest="desaggregate", default=False, action='store_true',
329
+ help="Desaggregate table columns")
330
+ parser.add_argument("--desagg_col", dest="desagg_col",
331
+ help="Column index (1 based) to use as reference", type=list_based_0)
332
+ parser.add_argument("--desagg_sep", dest="desagg_sep", default=",",
333
+ help="Character separator when to split string column")
334
+ parser.add_argument("--excel_cols", dest="excColumns2extract", default=[], type=list_based_0,
335
+ help="Comma-separated column position(s) to extract (1 based). If not used, all columns will be extracted")
336
+ parser.add_argument("--excel_rows", dest="excRows2extract", default=[], type=list_based_0,
337
+ help="Comma-separated row position(s) to extract (1 based). If not used, all rows will be extracted")
338
+ parser.add_argument("--excel_sheet_number", dest="excSheet_number", default=0, type=based_0,
339
+ help="Sheet number to work with. Default 1")
340
+ parser.add_argument("--file_type", dest="file_type", default='text',
341
+ help="Default text. Other options;excel")
342
+ parser.add_argument("--out_file_type", dest="out_file_type", default='text',
343
+ help="Default text. Other options;excel")
344
+ parser.add_argument("--from", dest="frm", default=0, type=based_0,
345
+ help="Column in index file to take reference value. Default 1. Numeration is 1 based")
346
+ parser.add_argument("--to", dest="to", default=1, type=based_0,
347
+ help="Column in index file to take the value that will be used in substitution. Default 2. Numeration is 1 based")
348
+ parser.add_argument("--latex", dest="to_latex", default=False, action='store_true',
349
+ help="Write table in latex code")
350
+ parser.add_argument("--sample_attributes", dest="sample_attributes", default=[], type=list_str,
351
+ help="Define sample atributtes (comma separated list) to colapse a long table in a wide metric table")
352
+ parser.add_argument("--long_to_wide", dest="long_to_wide", default=False, action='store_true',
353
+ help="To transform a long table in a wide table. The id column will be the column/s of sample attributes if specified, or the first column if not. The key columns will be the columns between the id column and the value column, that will be the last column of the table")
354
+ parser.add_argument("--corrupted", dest="corrupted",
355
+ help="File where corrupted metrics are stored")
356
+ parser.add_argument("--offset", dest="offset", default=[], type=list_str,
357
+ help="To subset N rows from table. Indicate as 'start_row,number_row' where start_row es the line to begin the extraction (1 based) and number_row is the amount of lines to extract")
358
+ parser.add_argument("--split_out", dest="split_out", default=False, action='store_true',
359
+ help="Split output table in several files")
360
+ parser.add_argument("--sp_chunk_size", dest="sp_chunk_size", default= 0, type=int,
361
+ help="To split the ouput table in chunks on K lines in different files.")
362
+ parser.add_argument("--sp_file_number", dest="sp_file_number", default= 0, type=int,
363
+ help="To split the output table in N files with the same number of lines.")
364
+ parser.add_argument("--extract_cols", dest="extract_cols", default=[], type=list_str,
365
+ help="Columns to extract from table, comma separated (based 1)")
366
+ parser.add_argument("--ext_col_match", dest="ext_col_match", type=list_based_0,
367
+ help="Select columns where search keywords. Format: x,y,z..")
368
+ parser.add_argument("--ext_keywords", dest="ext_keywords",
369
+ help="Keywords for select rows. Format: key1_col1&key2_col1%%key1_col2&key2_col2")
370
+ parser.add_argument("--ext_keyword_file", dest="ext_keyword_file",
371
+ help="File with one keyword per line. They will be used to search in all the specified columns in --ext_col_match")
372
+ parser.add_argument("--ext_search_mode", dest="ext_search_mode", default='c', choices=['c', 's'],
373
+ help="c for match in every columns set, s some match in some column. Default c")
374
+ parser.add_argument("--ext_match_mode", dest="ext_match_mode", default='i', choices=['i', 'c'],
375
+ help="i string must include the keyword, c for fullmatch. Default i")
376
+ parser.add_argument("--ext_reverse", dest="ext_reverse", default=False, action='store_true',
377
+ help="Select not matching")
378
+ parser.add_argument("--ext_stats", dest="ext_stats", default=False, action='store_true',
379
+ help="Print row extraction statistics")
380
+ parser.add_argument("--uniq", dest="uniq", default=False, action='store_true',
381
+ help="Make rows unique")
382
+ parser.add_argument("--sort_rows_by", dest="sort_rows_by", default=None,
383
+ help="Sort rows of the table ([a]scending or [d]escending or custom) by given columns, like: 0,a;1,d;2,d score,a;name,d pats,pat1|pat2|pat3 pats,path_sort_file")
384
+ opts = parser.parse_args(args)
385
+ main_cmdtabs(opts)
386
+
387
+
388
+ def cmdtabs_merge(args=None):
389
+ if args == None: args = sys.argv[1:]
390
+ parser = argparse.ArgumentParser(description=f'Usage: {os.path.basename(__file__)} [options]')
391
+ add_common_options(parser)
392
+ parser.add_argument("-H", "--header", dest="header", default=False, action='store_true',
393
+ help="Indicate if files have header")
394
+ parser.add_argument("-o", "--output_file", dest="output_file", default=None,
395
+ help="Path to output file")
396
+ parser.add_argument("-s", "--separator", dest="separator", default="\t", type=unescaped_str,
397
+ help="Input table column character separator")
398
+ parser.add_argument("-a", "--a_file", dest="a_file",
399
+ help="Path to input file")
400
+ parser.add_argument("-b", "--b_file", dest="b_file",
401
+ help="Path to input file")
402
+ parser.add_argument("-A", "--a_cols", dest="a_cols", default=[0], type=list_based_0,
403
+ help="Index of columns in base 1 to compare")
404
+ parser.add_argument("-B", "--b_cols", dest="b_cols", default=[0], type=list_based_0,
405
+ help="Index of columns in base 1 to compare")
406
+ parser.add_argument("-c", "--count", dest="count", default=False, action='store_true',
407
+ help="Only compute number of matches")
408
+ parser.add_argument("--full", dest="full", default=False, action='store_true',
409
+ help="Give full record")
410
+ parser.add_argument("-k", "--keep", dest="keep", default='c', choices=['a', 'b', 'c', 'ab'],
411
+ help="Keep records. c for common, 'a' for specific of file a, 'b' for specific of file b and 'ab' for specific of file a AND b")
412
+
413
+ parser.add_argument("--tables", dest="tables", default=None, type=list_str,
414
+ help="Path to tables, comma separated. Paths could include wildcards")
415
+ parser.add_argument("--fill_character", dest="fill_character", default="-",
416
+ help="Character to fill when a field is empty")
417
+ parser.add_argument("--columns2add", dest="columns2add", default=[], type=nested_int_list,
418
+ help="For each file to add to the first file, column indexes 1 based comma separated. To separate each column set, use semicolon ;")
419
+ parser.add_argument("--union", dest="union", default=False, action='store_true',
420
+ help="If a row in a file has not match in the merging table is added to it")
421
+ opts = parser.parse_args(args)
422
+ main_cmdtabs_merge(opts)
423
+
424
+