Skip to content

Commit bab688a

Browse files
added parameters documentation to tpmFromCounts
1 parent b18ef86 commit bab688a

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

build/utils/tpmFromCounts.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,30 @@
1616
import pandas as pd
1717

1818
def main(counts_data, genome_link, gene_column, out_file):
19+
"""
20+
Converts RNA count matrix to tpm matrix (transcripts per million).
21+
22+
Parameters
23+
----------
24+
counts_data : string
25+
Path to RNA sequencing counts data. No default
26+
27+
genome_link : string
28+
Link to human genome build. Defaults to "https://ftp.ensembl.org/pub/grch37/release-113/gtf/homo_sapiens/Homo_sapiens.GRCh37.87.gtf.gz"
29+
30+
gene_column : string
31+
Column name of column with gene name information. Defaults to "stable_id".
32+
33+
out_file : string
34+
Path to output csv. No default.
35+
36+
Returns
37+
-------
38+
None
39+
40+
"""
1941
# read in counts data
20-
if isinstance(counts_data, pd.DataFrame) == False:
21-
counts = pd.read_csv(counts_data,sep='\t')
42+
counts = pd.read_csv(counts_data,sep='\t')
2243
counts.index=counts[gene_column]
2344

2445
##get list of patients

0 commit comments

Comments
 (0)