Skip to content

Commit

Permalink
added --csv_no_header
Browse files Browse the repository at this point in the history
  • Loading branch information
RaverJay committed Jan 28, 2021
1 parent 7f12dc9 commit cc98940
Show file tree
Hide file tree
Showing 4 changed files with 1,323 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ makes use of
## Full usage
```
usage: fastcov.py [-h] [-p POSITION] [-l] [-o OUTPUT_FILE] [-c CSV_OUT]
[--csv_no_header]
bamfile [bamfile ...]
Plot the coverage based on some bam files.
Expand All @@ -45,4 +46,5 @@ optional arguments:
Specify csv data output filename. Use '-' to write to
stdout. Will disable plot output by default, specify
--output_file to re-enable plot output.
--csv_no_header Suppress column names in csv output.
```
8 changes: 4 additions & 4 deletions fastcov.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ def fastcov_main():
if args.csv_out:
if args.csv_out == '-':
log('Writing csv to stdout ...')
data.to_csv(sys.stdout)
log(f'Wrote csv data to stdout')
data.to_csv(sys.stdout, header=(not args.csv_no_header))
log(f'Wrote csv data to stdout.')
else:
log('Writing csv ...')
data.to_csv(args.csv_out)
log(f'Wrote csv data to {args.csv_out}')
data.to_csv(args.csv_out, header=(not args.csv_no_header))
log(f'Wrote csv data to {args.csv_out}.')
if not args.output_file:
do_plots = False

Expand Down
3 changes: 3 additions & 0 deletions input_interpretation.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ def parse_args():
parser.add_argument("-c", "--csv_out",
help="Specify csv data output filename. Use '-' to write to stdout. Will disable plot output by default, "
"specify --output_file to re-enable plot output.")
parser.add_argument("--csv_no_header", action='store_true',
help="Suppress column names in csv output.")
args = parser.parse_args()

return args


Expand Down
Loading

0 comments on commit cc98940

Please sign in to comment.