Skip to content

Commit

Permalink
Merge pull request #7 from 4dn-dcic/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
SooLee authored Jul 6, 2017
2 parents 58bf528 + bb7486f commit 573bebf
Show file tree
Hide file tree
Showing 20 changed files with 24 additions and 463 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ optional arguments:
-s SAMPLE_NAME, --sample_name SAMPLE_NAME
sample name to be used as the file prefix and in the
report (do not include space)
-M MAX_LOGDISTANCE, --max_logdistance MAX_LOGDISTANCE
Maximum log distance. This number should not be larger
than all chromosomes. Choose 8.2 for mouse. Default
8.4 (human).
```
2) plot.r
```
Expand All @@ -86,6 +90,8 @@ python pairsqc.py -p test_samples/merged_nodup.tab.chrblock_sorted.txt.gz -c tes
Rscript plot.r 4
zip report.zip report # if you want to create a zip file for the report.
```
* Note : The default max logdistance is set to be 8.4, which works for human. For non-human species, use -M option to reset the max logdistance. (e.g. -M 8.2 for mouse)


 
### QC metrics and plots
Expand Down
9 changes: 9 additions & 0 deletions VERSION_HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
* The report can now contain information about multiple samples.
* `pairsqc.py` now takes sample name as an option (-s). The output files in the output report directory will have the sample name as file prefix.
* `plot.r` also assumes sample names as prefix in the report directory (auto-detect).
* Now d3 interactive plots are integrated with the Nozzle report. (https://github.com/SooLee/d3forNozzleR)

### 0.2.1
* 'Sample' is used as a sample name place holder (instead of an empty string), when sample name is not specified.

### 0.2.2
* `-M` option is introduced to work for non-human species (e.g. -M 8.2 for mouse)


145 changes: 0 additions & 145 deletions interactive_multiline.js

This file was deleted.

10 changes: 9 additions & 1 deletion pairsqc.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ def distance_histogram (pairs_file, chromsize_file, outfilename, cols=cols_pairs
parser.add_argument('-t','--input_type', help = "input file type (P:pairs, M:merged_nodups, OM:old_merged_nodups)")
parser.add_argument('-O','--outdir_prefix', help = "prefix of output directory (output directory name will be <outdir_prefix>_report")
parser.add_argument('-s','--sample_name', help = "sample name to be used as the file prefix and in the report (do not include space)")
parser.add_argument('-M','--max_logdistance', help = "Maximum log distance. This number should not be larger than all chromosomes. Choose 8.2 for mouse. Default 8.4 (human).")
args = parser.parse_args()

if args.outdir_prefix:
Expand Down Expand Up @@ -359,7 +360,14 @@ def distance_histogram (pairs_file, chromsize_file, outfilename, cols=cols_pairs
CIS_TRANS_OUT_FILE_PATH = outdir + '/' + sample_name + '.' + CIS_TRANS_OUT_FILE_SUFFIX
PLOT_TABLE_OUT_FILE_PATH = outdir + '/' + sample_name + '.' + PLOT_TABLE_OUT_FILE_SUFFIX


# max_logdistance
if args.max_logdistance:
max_logdist = float(args.max_logdistance)
else:
max_logdist = 8.4

# get the stats
cis_trans_ratio (args.pairs, outfilename=CIS_TRANS_OUT_FILE_PATH, cols = cols)
distance_histogram (args.pairs, args.chrsize, outfilename=PLOT_TABLE_OUT_FILE_PATH, cols = cols, orientation_list = orientation_list)
distance_histogram (args.pairs, args.chrsize, outfilename=PLOT_TABLE_OUT_FILE_PATH, cols = cols, orientation_list = orientation_list, max_logdistance = max_logdist)

Binary file removed report.zip
Binary file not shown.
6 changes: 0 additions & 6 deletions report/cis_to_trans.out

This file was deleted.

Binary file removed report/pairsqc_report.RData
Binary file not shown.
Loading

0 comments on commit 573bebf

Please sign in to comment.