Skip to content
Snippets Groups Projects
Commit ad9d3e16 authored by Laura Urbanska's avatar Laura Urbanska
Browse files

updated poisson sampling script

parent 5ee3598f
No related branches found
No related tags found
No related merge requests found
......@@ -16,13 +16,13 @@ output: csv file with gene id and count
'''
def transcript_sampling(total_transcript_number, csv_file, output_csv):
df = pd.read_csv(csv_file)
def transcript_sampling(total_transcript_number, tsv_file, output_csv):
df = pd.read_csv(tsv_file, sep='\t', lineterminator='\n', names=["id", "level"]))
levels = []
for expression_level in df['level']:
poisson_sampled = np.random.poisson(total_transcript_number/expression_level)
poisson_sampled = np.random.poisson(total_transcript_number*expression_level)
levels.append(poisson_sampled)
transcript_numbers = pd.DataFrame({'id': df['id'],'count': levels})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment