Skip to content

References without cut-sites should still produce spurious read-pairs and not just excluded from simulation. #18

@Mustafa-Albekaa

Description

@Mustafa-Albekaa

I've been having some trouble simulating HiC reads, and after an hour of troubleshooting I think I've identified the issue.

This is the command I've been running, and the error I've been running into.

sim3C --dist uniform -n 10000 -l 150 -e Sau3AI -m hic --profile-name ${genome}_simhic_profile.tsv $genome.fasta ${genome}_simhic.fastq

ERROR    | 2020-08-25 02:09:05,237 |    main | 'Seq' object has no attribute 'id'
Traceback (most recent call last):
  File "/home/mustafa/.local/lib/python2.7/site-packages/sim3C/command_line.py", line 213, in main
    args.num_pairs, args.method, args.read_length, **kw_args)
  File "/home/mustafa/.local/lib/python2.7/site-packages/sim3C/simulator.py", line 307, in __init__
    create_cids=create_cids, linear=linear)
  File "/home/mustafa/.local/lib/python2.7/site-packages/sim3C/community.py", line 507, in __init__
    random_state, create_cids, linear))
  File "/home/mustafa/.local/lib/python2.7/site-packages/sim3C/community.py", line 82, in __init__
    self.sites = CutSites(enzyme, seq.seq, self.random_state, linear=linear)
  File "/home/mustafa/.local/lib/python2.7/site-packages/sim3C/site_analysis.py", line 63, in __init__
    raise NoCutSitesException(template_seq.id, str(enzyme))
AttributeError: 'Seq' object has no attribute 'id'

I believe the problem is that template_seq does not have an id method. Using type() on template_seq identifies it as a Bio.Seq.Seq object.

I've removed the sequences that were causing the issue and am now able to run the program, but this bug meant I was not able to easily identify which sequences did not have cut sites.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions