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

Writing reference index to directory without writing permission: segmentation fault #26

Open
wdecoster opened this issue Jul 10, 2017 · 3 comments
Milestone

Comments

@wdecoster
Copy link
Contributor

Hi,

It took me a while before I realised what the issue was, but when ngmlr tries to write the index
("Writing encoded reference to ...") to a directory to which I don't have writing permission I get a segmentation fault (core dumped) error.

Perhaps this problem could get a nicer error message? Or perhaps an option to specify where to write the index to. It's obviously easy to fix by making a symbolic link of the reference fasta to the current directory.

Cheers,
Wouter

@philres philres added this to the v0.2.7 milestone Jul 12, 2017
@philres
Copy link
Owner

philres commented Jul 12, 2017

Hi Wouter,

thanks for the feedback. I'll try adding a proper error message for this.

Cheers,
Philipp

philres pushed a commit that referenced this issue Oct 16, 2017
@wdecoster
Copy link
Contributor Author

A late follow up on this...

I used the following command:
(changed path to reference directory)

zcat fastq/*.fastq.gz | ngmlr --verbose -x ont -t 48 -r /path/to/dir/withoutwritepermission/genome_hg19.fa | samtools sort -o ngmlr_d6843_PromethION_20180207.bam -

and received this as output

ngmlr 0.2.6 (build: Feb  5 2018 15:35:54, start: 2018-02-12.11:45:06)
Contact: philipp.rescheneder@univie.ac.at
Wrinting output (SAM) to stdout
Encoding reference sequence.
Size of reference genome 3101 Mbp (max. 68719 Mbp)
Allocating 1550944936 (3101807213) bytes for the reference.
BinRef length: 1550944891ll (elapsed 653.038025)
0 reference sequences were skipped (length < 10).
Writing encoded reference to /path/to/dir/withoutwritepermission/genome_hg19.fa-enc.2.ngm

After this, the program just quits silently. The file /path/to/dir/withoutwritepermission/genome_hg19.fa-enc.2.ngm does not exist since I don't have writing permission to that, but no error was raised. I softlinked the reference fasta to the current directory and used that file, and now it seems to work.

@wdecoster wdecoster reopened this Feb 12, 2018
@wdecoster
Copy link
Contributor Author

And not entirely related: combining --verbose with writing the output to stdout goes bonkers, with the reads eventually ending up on my terminal.

philres pushed a commit that referenced this issue Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants