Code Monkey home page Code Monkey logo

hic_qc's People

Contributors

bnelsj avatar dependabot[bot] avatar hayleymangelson avatar hhayleyj avatar maximilianpress avatar shawnpg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hic_qc's Issues

Errow when installing hic_qc

Hi,

I followed the instructions to install hic_qc on HPC with my own account. The error message is as following. I know nothing about Python. Could anyone help me solve this?

Thanks!

(hic_qc)
/home/lson1234/tools/hic_qc $ python setup.py install --user
usage: git rev-list [OPTION] ... [ -- paths... ]
limiting output:
--max-count=nr
--max-age=epoch
--min-age=epoch
--sparse
--no-merges
--remove-empty
--all
--branches
--tags
--remotes
--stdin
--quiet
ordering output:
--topo-order
--date-order
--reverse
formatting output:
--parents
--children
--objects | --objects-edge
--unpacked
--header | --pretty
--abbrev=nr | --no-abbrev
--abbrev-commit
--left-right
special purpose:
--bisect
--bisect-vars
--bisect-all
Traceback (most recent call last):
File "setup.py", line 6, in
version=versioneer.get_version(),
File "/home/lson1234/tools/hic_qc/versioneer.py", li ne 1480, in get_version
return get_versions()["version"]
File "/home/lson1234/tools/hic_qc/versioneer.py", li ne 1453, in get_versions
pieces = from_vcs_f(cfg.tag_prefix, root, verbose)
File "/home/lson1234/tools/hic_qc/versioneer.py", li ne 1110, in git_pieces_from_vcs
pieces["distance"] = int(count_out) # total number of commits
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

ERROR provided too many kwargs,

Hi

I want to measure the quality of my HiC data reads, I tried to run ALIGNING AND QCING PHASE GENOMICS HI-C DATA tutorial, hic_qc script install and bwa step runs well, so when I tried to execute hic_qc.py script from installation path I obtain ValueError provided too many kwargs, can only pass {'basex', 'subsx', nonposx'} or {'basey', 'subsy', nonposy'}. You passed {'nonpositive': 'clip'}

And extract of terminal output as follows:

(hic_qc) ddelgadillo@COMOSPLNXU09:~/Software/hic_qc$ python hic_qc.py -b tests/collateral/input/abc_test.bam -r
[hic_qc - 2021-03-26 15:31:59,685] parsing the first 1000000 read pairs in bam file tests/collateral/input/abc_test.bam to Q                  C Hi-C library quality
Traceback (most recent call last):
  File "hic_qc.py", line 1147, in <module>
    QC.plot_histograms()
  File "hic_qc.py", line 596, in plot_histograms
    plt.yscale('log', nonpositive='clip')
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/pyplot.py", line 3084, in yscale
    return gca().set_yscale(value, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 3704, in set_ys                  cale
    ax.yaxis._set_scale(value, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/axis.py", line 767, in _set_scale
    self._scale = mscale.scale_factory(value, self, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/scale.py", line 569, in scale_factor                  y
    return _scale_mapping[scale](axis, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/scale.py", line 249, in __init__
    "{!r}".format(kwargs))
ValueError: provided too many kwargs, can only pass {'basex', 'subsx', nonposx'} or {'basey', 'subsy', nonposy'}.  You passe                  d {'nonpositive': 'clip'}
(hic_qc) ddelgadillo@COMOSPLNXU09:~/Software/hic_qc$ python hic_qc.py -b /home/bioinfo/HiFiPotato/Hi-C/alCnV1PEHQC.bam -r -o qc
[hic_qc - 2021-03-26 15:36:19,863] parsing the first 1000000 read pairs in bam file /home/bioinfo/HiFiPotato/Hi-C/alCnV1PEHQC.bam to QC Hi-C library quality
Traceback (most recent call last):
  File "hic_qc.py", line 1147, in <module>
    QC.plot_histograms()
  File "hic_qc.py", line 596, in plot_histograms
    plt.yscale('log', nonpositive='clip')
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/pyplot.py", line 3084, in yscale
    return gca().set_yscale(value, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 3704, in set_yscale
    ax.yaxis._set_scale(value, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/axis.py", line 767, in _set_scale
    self._scale = mscale.scale_factory(value, self, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/scale.py", line 569, in scale_factory
    return _scale_mapping[scale](axis, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/scale.py", line 249, in __init__
    "{!r}".format(kwargs))
ValueError: provided too many kwargs, can only pass {'basex', 'subsx', nonposx'} or {'basey', 'subsy', nonposy'}.  You passed {'nonpositive': 'clip'}

Thank some much for your attention

HiCQC' object has no attribute 'ref_assembly

Hello

I aligned my HiC data on reference using Bowties. Then I used hic-qc but I get the following error:

(base) user@fl017:.../project/qaafi-cnafs/bowtie2-master> hic_qc.py -b align.bam -n 1750306
[hic_qc - 2022-02-14 16:55:44,615] parsing the first 1750306 read pairs in bam file align.bam to QC Hi-C library quality
Traceback (most recent call last):
File "/sw/QFAB/miniconda3/envs/hic_qc_20211115/bin/hic_qc.py", line 1151, in
QC.stringify_stats()
File "/sw/QFAB/miniconda3/envs/hic_qc_20211115/bin/hic_qc.py", line 870, in stringify_stats
'ref_assembly': (self.ref_assembly, '{}'),
AttributeError: 'HiCQC' object has no attribute 'ref_assembly'

Python setup.py install ERROR!!!

Hi,
I have the same question about the install step, but the questioner didn't update on last issue, maybe he solved the question? So I create a new issue.
We used conda to create env to installation just following README.

git clone https://github.com/phasegenomics/hic_qc.git
cd hic_qc/
conda env create -n hic_qc --file env.yml
conda activate hic_qc
python setup.py install --user

But it failed at the last step setup.pyinstall, below is the wrong message

And we checked the files were all exsit in the hic_qc file without anything missing.


(hic_qc) [crlee@h71 hic_qc]$ python setup.py
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
  limiting output:
    --max-count=nr
    --max-age=epoch
    --min-age=epoch
    --sparse
    --no-merges
    --remove-empty
    --all
    --branches
    --tags
    --remotes
    --stdin
    --quiet
  ordering output:
    --topo-order
    --date-order
    --reverse
  formatting output:
    --parents
    --children
    --objects | --objects-edge
    --unpacked
    --header | --pretty
    --abbrev=nr | --no-abbrev
    --abbrev-commit
    --left-right
  special purpose:
    --bisect
    --bisect-vars
    --bisect-all
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    version=versioneer.get_version(),
  File "/home/hpc/crlee/softwares/hic_qc/versioneer.py", line 1480, in get_version
    return get_versions()["version"]
  File "/home/hpc/crlee/softwares/hic_qc/versioneer.py", line 1453, in get_versions
    pieces = from_vcs_f(cfg.tag_prefix, root, verbose)
  File "/home/hpc/crlee/softwares/hic_qc/versioneer.py", line 1110, in git_pieces_from_vcs
    pieces["distance"] = int(count_out)  # total number of commits
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Could anyone help me about this? Thank you so much.

qc_repo_path not defined in write_pdf_report()

Hi,

Installed the package, along with its requirements with conda. When running the following command line:
$ hic_qc.py -b KO61_aligned.bam -r -o K061_output

At the end we get an error about qc_repo_path not defined, and no html nor pdf file is generated.

    QC.write_pdf_report()
  File "/usr/local/hic_qc/hic_qc.py", line 1105, in write_pdf_report
    qc_repo_path)
NameError: global name 'qc_repo_path' is not defined

Thanks in advance for your help.

The --make_report flag doesn't get used

hic_qc/hic_qc.py

Line 1101 in 219b0aa

parser.add_argument('--make_report', '-r', default=False, action='store_true',

I noticed that the PDF report is generated by default, and the flag never gets used even though it has a default value of false according to its help description.

hic_qc/hic_qc.py

Line 1153 in 219b0aa

QC.write_pdf_report()

I personally think the report is great, and should probably be made by default, so I guess the flag could do the opposite if you guys wanted.

AttributeError: 'dict' object has no attribute 'references'

I encountered the following error:

Traceback (most recent call last):
  File "/path/hic_qc/hic_qc.py", line 1182, in <module>
    QC.parse_bam(args.bam_file, max_read_pairs=args.num_reads)
  File "/path/hic_qc/hic_qc.py", line 235, in parse_bam
    self.extract_header_info(bam_fh.header)
  File "/path/hic_qc/hic_qc.py", line 285, in extract_header_info
    self.refs = header.references
AttributeError: 'dict' object has no attribute 'references'

Which traces back to:

self.refs = header.references

Changing line 285 to:

self.refs = header['SQ']

appears to remedy the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.