<commit_before>generate_secondary_documentation
================================

Generate documentation for a secondary analysis in an easy to understand format

1st phase is markdown
<commit_msg>updated the readme<commit_after>Generate Scondary Analysis Documentation
========================================

A script to make an overview look at the qiime secondary analysis from my [qiime_secondary_analysis.py](https://github.com/gblanchard4/qiime_secondary_analysis).  
  
I created this to make looking at qiime analysis data easier. It can be pretty intimidating to get a zip directory of data. This helps relieve some fear by giving a user an easier interface to navigate the analysis with an enviroment they are familiar with, your favorite web browser. 



# Expectations  
Right now the script expects a certain folder structure, I will try to generalize it more in the future.

```
RootFolder
|
└───/Secondary1
		|
		|->	mapping_file.txt
		|->	mapping_file.txt
		|->	tree_file.tre
		|->	biom.biom
		|->	table_summary.txt
		|
		└───/alpha_diversity
		|		|
		|		└───/alpha_div_collated
		|		|		|
		|		|		|-> rarefaction_plots.html
		|		|		|
		|		|		└───/average_plots	
		|		|
		|		└───/alpha_rarefaction_plots
		|
		└───/beta_diversity
		|		|
		|		└───/2d_unweighted_unifrac_plots
		|		|
		|		└───/2d_weigthted_uniifrac_plots
		|		|
		|		└───/ANOSIM_*_unweighted
		|		|
		|		└───/ANOSIM_*_weighted
		|		|
		|		└───/unweighted_unifrac_emperor_pcoa_plot
		|		|
		|		└───/weighted_unifrac_emperor_pcoa_plot
		|		
		|
		└───/taxa_summary
		|		|
		|		└───/taxa_*
		|				|
		|				└───/taxa_summary_plots
		|						|
		|						|-> area_charts.html
		|						|-> bar_charts.html
		|						|
		|						└───/charts
		|
		└───/core_microbiome
				|
				└───core_microbiome_*/
						|
						|─> core_otus_(50-100).txt
						|─> core_otus_(50-100).biom
						|─> core_otus_size.pdf

```
# Usage 
`html_doc.py -i RootFolder`

This will create a file called `overview.html` in the *RootFolder* and each *SecondaryFolder*
{'fraction_non_alphanumeric': 0.15663848831427152, 'fraction_numerical': 0.007458975634012929, 'mean_word_length': 3.200417536534447, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6552441', 'n_tokens_mistral': 903, 'n_tokens_neox': 780, 'n_words': 158}