Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errno 2] No such file or directory: 'refFlat.txt' #507

Closed
moldach opened this issue Mar 27, 2020 · 2 comments
Closed
Labels

Comments

@moldach
Copy link

moldach commented Mar 27, 2020

I'm trying to use this tool for WGS data on C. elegans so I'm using the -m wgs flag. Furthermore, I have no normal samples to use for the reference so I use the -n flag without specifying any additional BAM files but I'm getting an error:


[moldach@cdr767 first_batch]$ cnvkit.py batch N2_trim_bwaMEM_sort_dedupped.bam -n -m wgs -f /scratch/moldach/data/references/c_elegans.PRJNA13758.WS265.genomic.fa --annotate refFlat.txt
CNVkit 0.9.7.b1
I: Scanning for accessible regions
        Accessible region I:0-15072434 (size 15072434)
II: Scanning for accessible regions
        Accessible region II:0-15279421 (size 15279421)
III: Scanning for accessible regions
        Accessible region III:0-13783801 (size 13783801)
IV: Scanning for accessible regions
        Accessible region IV:0-17493829 (size 17493829)
V: Scanning for accessible regions
        Accessible region V:0-20924180 (size 20924180)
X: Scanning for accessible regions
        Accessible region X:0-17718942 (size 17718942)
MtDNA: Scanning for accessible regions
        Accessible region MtDNA:0-13794 (size 13794)
I: Joining over small gaps
II: Joining over small gaps
III: Joining over small gaps
IV: Joining over small gaps
V: Joining over small gaps
X: Joining over small gaps
MtDNA: Joining over small gaps
Wrote c_elegans.PRJNA13758.WS265.genomic.bed with 7 regions
Detected file format: bed
Splitting large targets
Applying annotations as target names
Traceback (most recent call last):
  File "/scratch/moldach/bin/cnvkit/.venv/bin/cnvkit.py", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/scratch/moldach/bin/cnvkit/cnvkit.py", line 9, in <module>
    args.func(args)
  File "/scratch/moldach/bin/cnvkit/cnvlib/commands.py", line 110, in _cmd_batch
    args.reference, args.targets, args.antitargets = batch.batch_make_reference(
  File "/scratch/moldach/bin/cnvkit/cnvlib/batch.py", line 89, in batch_make_reference
    target_arr = target.do_target(bait_arr, annotate, short_names, True,
  File "/scratch/moldach/bin/cnvkit/cnvlib/target.py", line 20, in do_target
    annotation = tabio.read_auto(annotate)
  File "/scratch/moldach/bin/cnvkit/skgenome/tabio/__init__.py", line 102, in read_auto
    fmt = sniff_region_format(infile)
  File "/scratch/moldach/bin/cnvkit/skgenome/tabio/__init__.py", line 224, in sniff_region_format
    with as_handle(infile, 'rU') as handle:
  File "/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/3.8.0/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/scratch/moldach/bin/cnvkit/.venv/lib/python3.8/site-packages/Bio/File.py", line 120, in as_handle
    with open(handleish, mode, **kwargs) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'refFlat.txt'

I thought this command should create the "flat"reference for me? What's going on here?

@etal
Copy link
Owner

etal commented Apr 15, 2020

It should work if you leave off the --annotate refFlat.txt part. The --annotate option is for providing gene labels, and the argument is a tabular file downloaded from the UCSC Genome Browser FTP site (or another annotation source, as long as it's in GFF, UCSC BED, or UCSC RefGene format.)

@etal etal added the question label Apr 15, 2020
@etal etal closed this as completed Apr 15, 2020
@moldach
Copy link
Author

moldach commented May 22, 2020

Hi @etal leaving off --annotate refFlat.txt worked fine.

I'm just looking through the results now and have noticed an issue.

In the files produced I'm not seeing the LOH column. Any idea why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants