Skip to content

Commit b9233ee

Browse files
committed
Update dot_coverage.py
will plot whatever is in the csv with whatever name you give it
1 parent 0282543 commit b9233ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dot_coverage.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ def plot_alignment(ax_diagnostic, ax_align, f_csv):
130130
align_data['id'] = align_data['label'].str.lower()
131131
align_data = align_data.merge(name_key, how="left")
132132
align_data = align_data.sort_values('percentage')
133+
align_data.loc[align_data['new'].isnull(), 'new'] = align_data[align_data['new'].isnull()]['id']
134+
133135
align_data.loc[align_data['id'].str.contains('wuhan'), 'new'] = 'SARS-CoV-2'
134136

135137
#Plot diagnostic symbol
@@ -303,7 +305,7 @@ def plot(f_txt, dot_data, f_csv, y_length, write_file, crop_y, log_scale):
303305
if __name__ == "__main__":
304306
'''
305307
Example usage:
306-
python pared_dot_coverage.py ".txt file for coverage" ".paf file for dot plot" ".csv for alignment"
308+
python dot_coverage.py ".txt file for coverage" ".paf file for dot plot" ".csv for alignment"
307309
"y axis length" "destination for plots" "-c flag to cut out unaligned contigs" "-l flag for log scale coverage track"
308310
python dot_coverage.py depth_per_base.txt contig_nCoV-2019.paf stats.csv 29903 covid_plots
309311
'''

0 commit comments

Comments
 (0)