Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nargesr committed Jan 24, 2024
1 parent a48daa6 commit 1feba73
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 49 deletions.
3 changes: 1 addition & 2 deletions PyWGCNA/wgcna.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
BOLD = "\033[1m"
UNDERLINE = "\033[4m"


class WGCNA(GeneExp):
"""
A class used to do weighted gene co-expression network analysis.
Expand Down Expand Up @@ -2360,7 +2359,7 @@ def orderMEs(MEs, greyLast=True, greyName="MEgrey", orderBy=0, order=None, useSe
:param MEs: Module eigengenes in a multi-set format.
:type MEs: dict
:param greyLast: Normally the color grey is reserved for unassigned genes; hence the grey module is not a proper module and it is conventional to put it last. If this is not desired, set the parameter to FALSE. (default = True)
:type greyLast:bool
:type greyLast: bool
:param greyName: Name of the grey module eigengene. (default = "MEgrey")
:type greyName: str
:param orderBy: Specifies the set by which the eigengenes are to be ordered (in all other sets as well). Defaults to the first set in useSets (or the first set, if useSets is not given). (defualt = 0)
Expand Down
Binary file modified docs/doctrees/api.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/suggested_reading.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/html/_modules/PyWGCNA/geneExp.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h1>Source code for PyWGCNA.geneExp</h1><div class="highlight"><pre>
<span class="sd"> :type species: str</span>
<span class="sd"> :param level: which type of data you use including gene, transcript (default: gene)</span>
<span class="sd"> :type level: str</span>
<span class="sd"> :param anndata: if the expression data is in anndata format you should pass it through this parameter. X should be expression matrix. var is a sample information and obs is a gene information.</span>
<span class="sd"> :param anndata: if the expression data is in anndata format you should pass it through this parameter. X should be expression matrix. var is a gene information and obs is a sample information.</span>
<span class="sd"> :param anndata: anndata</span>
<span class="sd"> :param geneExp: expression matrix which genes are in the rows and samples are columns</span>
<span class="sd"> :type geneExp: pandas dataframe</span>
Expand Down
84 changes: 47 additions & 37 deletions docs/html/_modules/PyWGCNA/wgcna.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/html/_sources/suggested_reading.rst.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Suggested Reading
=========
=================

If you are unfamiliar with R refrence WGCNA, we suggest reading the original WGCNA publication:

Expand Down
10 changes: 5 additions & 5 deletions docs/html/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<dd class="field-odd"><ul class="simple">
<li><p><strong>species</strong> (<em>str</em>) – species of the data you use i.e mouse, human</p></li>
<li><p><strong>level</strong> (<em>str</em>) – which type of data you use including gene, transcript (default: gene)</p></li>
<li><p><strong>anndata</strong> – if the expression data is in anndata format you should pass it through this parameter. X should be expression matrix. var is a sample information and obs is a gene information.</p></li>
<li><p><strong>anndata</strong> – if the expression data is in anndata format you should pass it through this parameter. X should be expression matrix. var is a gene information and obs is a sample information.</p></li>
<li><p><strong>anndata</strong> – anndata</p></li>
<li><p><strong>geneExp</strong> (<em>pandas dataframe</em>) – expression matrix which genes are in the rows and samples are columns</p></li>
<li><p><strong>geneExpPath</strong> (<em>str</em>) – path of expression matrix</p></li>
Expand Down Expand Up @@ -195,8 +195,7 @@
<li><p><strong>species</strong> (<em>str</em>) – species of the data you use i.e mouse, human</p></li>
<li><p><strong>level</strong> (<em>str</em>) – which type of data you use including gene, transcript (default: gene)</p></li>
<li><p><strong>outputPath</strong> (<em>str</em>) – path you want to save all you figures and object (default: ‘’, where you rau your script)</p></li>
<li><p><strong>anndata</strong> – if the expression data is in anndata format you should pass it through this parameter. X should be expression matrix. var is a sample information and obs is a gene information.</p></li>
<li><p><strong>anndata</strong> – anndata</p></li>
<li><p><strong>anndata</strong> (<em>anndata</em>) – if the expression data is in anndata format you should pass it through this parameter. X should be expression matrix. var is a gene information and obs is a sample information.</p></li>
<li><p><strong>geneExp</strong> (<em>pandas dataframe</em>) – expression matrix which genes are in the rows and samples are columns</p></li>
<li><p><strong>geneExpPath</strong> (<em>str</em>) – path of expression matrix</p></li>
<li><p><strong>sep</strong> (<em>str</em>) – separation symbol to use for reading data in geneExpPath properly</p></li>
Expand Down Expand Up @@ -718,7 +717,7 @@
<dt class="sig sig-object py" id="PyWGCNA.wgcna.WGCNA.goodSamplesGenes">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">goodSamplesGenes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">datExpr</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">weights</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">minFraction</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">minNSamples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">4</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">minNGenes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">4</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tol</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">minRelativeWeight</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/PyWGCNA/wgcna.html#WGCNA.goodSamplesGenes"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#PyWGCNA.wgcna.WGCNA.goodSamplesGenes" title="Permalink to this definition"></a></dt>
<dd><p>Checks data for missing entries, entries with weights below a threshold, and zero-variance genes. If necessary, the filtering is iterated.</p>
<p>:param datExpr:expression data. A data frame in which columns are genes and rows ar samples.
<p>:param datExpr:expression data. A data frame in which columns are samples and rows are gene.
:type datExpr: pandas dataframe
:param weights: optional observation weights in the same format (and dimensions) as datExpr.
:type weights: pandas dataframe
Expand Down Expand Up @@ -876,12 +875,13 @@

<dl class="py method">
<dt class="sig sig-object py" id="PyWGCNA.wgcna.WGCNA.module_trait_relationships_heatmap">
<span class="sig-name descname"><span class="pre">module_trait_relationships_heatmap</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">metaData</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">figsize</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">file_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'module-traitRelationships'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/PyWGCNA/wgcna.html#WGCNA.module_trait_relationships_heatmap"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#PyWGCNA.wgcna.WGCNA.module_trait_relationships_heatmap" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">module_trait_relationships_heatmap</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">metaData</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">alternative</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'two-sided'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">figsize</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">file_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'module-traitRelationships'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/PyWGCNA/wgcna.html#WGCNA.module_trait_relationships_heatmap"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#PyWGCNA.wgcna.WGCNA.module_trait_relationships_heatmap" title="Permalink to this definition"></a></dt>
<dd><p>plot topic-trait relationship heatmap</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>metaData</strong> (<em>list</em>) – traits you would like to see the relationship with topics (must be column name of datExpr.obs)</p></li>
<li><p><strong>alternative</strong> (<em>str</em>) – Defines the alternative hypothesis for calculating correlation for module-trait relationship. Default is ‘two-sided’. The following options are available: ‘two-sided’: the correlation is nonzero, ‘less’: the correlation is negative (less than zero), ‘greater’: the correlation is positive (greater than zero)</p></li>
<li><p><strong>figsize</strong> (<em>tuple of float</em>) – indicate the size of plot</p></li>
<li><p><strong>show</strong> (<em>bool</em>) – indicate if you want to show the plot or not (default: True)</p></li>
<li><p><strong>file_name</strong> (<em>str</em>) – name and path of the plot use for save (default: topic-traitRelationships)</p></li>
Expand Down
2 changes: 1 addition & 1 deletion docs/suggested_reading.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Suggested Reading
=========
=================

If you are unfamiliar with R refrence WGCNA, we suggest reading the original WGCNA publication:

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
setup(
name='PyWGCNA', # the name of your package
packages=['PyWGCNA'], # same as above
version='2.0.1', # version number
version='2.0.2', # version number
license='MIT', # license type
description='PyWGCNA is a Python package designed to do Weighted correlation network analysis (WGCNA)',
# short description
author='Narges Rezaie', # your name
author_email='[email protected]', # your email
url='https://github.com/mortazavilab/PyWGCNA', # url to your git repo
download_url='https://github.com/mortazavilab/PyWGCNA/archive/refs/tags/v2.0.1.zip', # link to the tar.gz file associated with this release
download_url='https://github.com/mortazavilab/PyWGCNA/archive/refs/tags/v2.0.2.zip', # link to the tar.gz file associated with this release
keywords=['PyWGCNA', 'WGCNA', 'bulk', 'gene clustering', 'network analysis'], #
install_requires=[ # these can also include >, <, == to enforce version compatibility
'pandas>=2.1.0', # make sure the packages you put here are those NOT included in the
Expand Down

0 comments on commit 1feba73

Please sign in to comment.