Skip to content

Commit

Permalink
Extend help text and potential bug fix for #655
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimwolff authored Jan 18, 2021
1 parent f29e95e commit ed9d28e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hicexplorer/hicPCA.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ def parse_arguments():
action='store_true')

parserOpt.add_argument('--extraTrack',
help='Either a gene track or a histon mark coverage'
help='Either a gene track or a histone mark coverage'
' file (preferably a broad mark) is needed to decide'
' if the values of the eigenvector need a sign flip'
' or not.',
' or not. Please consider: bed files are interpreted as'
' gene tracks and bigwig files as histone marks.',
default=None)

parserOpt.add_argument('--histonMarkType',
Expand Down Expand Up @@ -175,7 +176,7 @@ def correlateEigenvectorWithGeneTrack(pMatrix, pEigenvector, pGeneTrack):
for chromosome in chromosome_list:
bin_id = pMatrix.getChrBinRange(chromosome)
for i, eigenvector in enumerate(pEigenvector):
_correlation = pearsonr(eigenvector[bin_id[0]:bin_id[1]].real,
_correlation = pearsonr(np.array(eigenvector[bin_id[0]:bin_id[1]]).real,
gene_occurrence_per_chr[chromosome])
if _correlation[0] < 0:
eigenvector[bin_id[0]:bin_id[1]] = np.negative(eigenvector[bin_id[0]:bin_id[1]])
Expand Down

0 comments on commit ed9d28e

Please sign in to comment.