diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml index 84ced72..2e5be1f 100644 --- a/.github/workflows/jekyll-gh-pages.yml +++ b/.github/workflows/jekyll-gh-pages.yml @@ -42,176 +42,243 @@ jobs: - name: Convert Markdown to HTML run: | python <', r'
', html_content) - html_content = re.sub(r'', r'
', html_content) - html_content = re.sub(r'
', r'', html_content) - - # Jinja2 template for HTML output - template = Template(''' - - - - - - MetaX - - - - - - - -
- {{ content }} -
- - - - - - - - - ''') - - # Render the template with the content and TOC items - html_output = template.render(content=html_content, toc_items=toc_items) - - # Write the HTML output to a file - output_file_path = './Docs/index.html' - with open(output_file_path, 'w', encoding='utf-8') as file: - file.write(html_output) - - print("HTML file has been generated successfully.") - + import markdown + from jinja2 import Template + import re + + # Read markdown file + markdown_file_path = './Docs/MetaX_Cookbook.md' + with open(markdown_file_path, 'r', encoding='utf-8') as file: + markdown_content = file.read() + + # Remove # Contents and [TOC] + markdown_content = markdown_content.replace('# Contents', '').replace('[TOC]', '') + + # Extract headings and generate table of contents + headings = re.findall(r'^(#+) (.+)', markdown_content, re.MULTILINE) + toc_items = [] + + for heading in headings: + level = len(heading[0]) + title = heading[1] + anchor = re.sub(r'\W+', '-', title.lower()).strip('-') + toc_items.append((level, title, anchor)) + + # Convert markdown to HTML + html_content = markdown.markdown(markdown_content, extensions=['tables', 'toc']) + + # Add Bootstrap classes to tables and images + html_content = re.sub(r'', r'
', html_content) + html_content = re.sub(r'', r'
', html_content) + html_content = re.sub(r'
', r'', html_content) + + # Jinja2 template for HTML output + template = Template(''' + + + + + + MetaX + + + + + + + +
+ {{ content }} +
+ + + + + + + + + + + ''') + + # Render the template with the content and TOC items + html_output = template.render(content=html_content, toc_items=toc_items) + + # Write the HTML output to a file + output_file_path = './Docs/index.html' + with open(output_file_path, 'w', encoding='utf-8') as file: + file.write(html_output) + + print("HTML file has been generated successfully.") + EOF - name: Setup Pages diff --git a/Docs/MetaX_Cookbook.md b/Docs/MetaX_Cookbook.md index a3591dc..a8b1696 100644 --- a/Docs/MetaX_Cookbook.md +++ b/Docs/MetaX_Cookbook.md @@ -138,12 +138,11 @@ Click **Create Proteins Intensity Table** to sum peptides to proteins if the Pro 1. Build the rank of proteins. 2. Choose the protein with a higher rank for the shared peptide. - - - **Methods to Build Protein Rank:** - - unique_counts: Use the counts of proteins inferred by unique peptides. - - all_count: Use the counts of all proteins. - - unique_intensity: Use the intensity of proteins inferred by unique peptides. - - shared_intensity: Use the intensity divided by the number of shared peptides for each protein. + >Methods to Build Protein Rank: + >- unique_counts: Use the counts of proteins inferred by unique peptides. + >- all_count: Use the counts of all proteins. + >- unique_intensity: Use the intensity of proteins inferred by unique peptides. + >- shared_intensity: Use the intensity divided by the number of shared peptides for each protein. ### Data preprocessing @@ -215,7 +214,7 @@ There are several methods for detecting and handling outliers. - **Trace Shifting:** Reframing the Normalization Problem with Intensity traces (inspired by DirectLFQ). - Note: If both trace shifting and transformation are applied, *normalization will be done before transformation.* - - Standard Scaling (Z-Score), Min-Max Scaling, Pareto Scaling, Mean centring and Normalization by sum. + - Standard Scaling (Z-Score), Min-Max Scaling, Pareto Scaling, Mean centring and Normalization by Precentage. If you use [Z-Score, Mean centring and Pareto Scaling] data normalization, the data will be given a minimum offset again to avoid negative values.