HingeAssembler / HINGE

Software accompanying "HINGE: Long-Read Assembly Achieves Optimal Repeat Resolution"
http://genome.cshlp.org/content/27/5/747.full.pdf+html?sid=39918b0d-7a7d-4a12-b720-9238834902fd
Other
64 stars 9 forks source link

hinge: line 8: 15600 Segmentation fault draft_assembly $* #96

Closed mictadlo closed 7 years ago

mictadlo commented 7 years ago

Hi, I used hinge in the following way:

cd /work/lorencm/apps/HINGE
source utils/setup.sh
cd /work/lorencm/apps/HINGE/data/fruit
#HPC.daligner -t10 fruit | csh -v
#LAmerge fruit.las fruit.*.las
#rm fruit.*.las # we only need fruit.las
DASqv -c100 fruit fruit.las
# Run filter

mkdir log
hinge filter --db fruit --las fruit.las -x fruit --config ../../utils/nominal.ini

# Run layout

hinge layout --db fruit --las fruit.las -x fruit --config ../../utils/nominal.ini -o fruit

# Run postprocessing

hinge clip fruit.edges.hinges fruit.hinge.list 1

# get draft assembly 

hinge draft-path $PWD fruit fruit1.G2.graphml
hinge draft --db fruit --las fruit.las --prefix fruit --config ../../utils/nominal.ini --out fruit.draft

# get consensus assembly

hinge correct-head fruit.draft.fasta fruit.draft.pb.fasta draft_map.txt
fasta2DB draft fruit.draft.pb.fasta 
HPC.daligner fruit draft | zsh -v  
hinge consensus draft fruit draft.fruit.las fruit.consensus.fasta ../../utils/nominal.ini
hinge gfa $PWD fruit fruit.consensus.fasta

#results should be in fruit_consensus.gfa

but I ran into the following problems:

[2017-02-14 15:09:03.814] [log] [info] removed contained reads, active reads: 20796
[2017-02-14 15:09:03.861] [log] [info] active reads: 20796
[2017-02-14 15:09:19.887] [log] [info] 44591 killed hinges
[2017-02-14 15:09:19.887] [log] [info] 121770 hinges
[2017-02-14 15:09:32.237] [log] [info] 121770 active hinges
[2017-02-14 15:09:41.929] [log] [info] Building hinge graph
[2017-02-14 15:09:42.045] [log] [info] num hinges 1625372
[2017-02-14 15:12:20.878] [log] [info] Hinge graph built
Total number of components: 1511513
[2017-02-14 15:12:34.782] [log] [info] after filter 32822 active hinges
[2017-02-14 15:12:41.289] [log] [info] Starting to build assembly graph.
[2017-02-14 15:12:47.617] [log] [info] sort and output finished
[2017-02-14 15:12:47.617] [log] [info] version 0.0.3
/work/lorencm/apps/HINGE/inst/bin/hinge: line 8: 15594 Illegal instruction     pruning_and_clipping.py $*
/work/lorencm/apps/HINGE/inst/bin/hinge: line 8: 15597 Illegal instruction     get_draft_path.py $*
[2017-02-14 15:18:01.956] [log] [info] draft consensus
[2017-02-14 15:18:01.956] [log] [info] name of db: fruit, name of .las file fruit.las
[2017-02-14 15:18:01.956] [log] [info] name of fasta: , name of .paf file 
[2017-02-14 15:18:01.956] [log] [info] filter files prefix: fruit
[2017-02-14 15:18:01.956] [log] [info] output prefix: fruit.draft
[2017-02-14 15:18:01.963] [log] [info] Parameters passed in 

[filter]
length_threshold = 1000;
quality_threshold = 0.23;
n_iter = 3; // filter iteration
aln_threshold = 1000;
min_cov = 5;
cut_off = 300;
theta = 300;
use_qv = true;

[running]
n_proc = 12;

[draft]
min_cov = 10;
trim = 200;
edge_safe = 100;
tspace = 900;
step = 50;

[consensus]
min_length = 4000;
trim_end = 200;
best_n = 1;
quality_threshold = 0.23;

[layout]
hinge_slack = 1000
min_connected_component_size = 8

[2017-02-14 15:18:02.329] [log] [info] Load alignments from fruit.las
[2017-02-14 15:18:02.329] [log] [info] # Alignments: 1693423760
[2017-02-14 15:18:02.329] [log] [info] # Reads: 1044634
[2017-02-14 15:40:02.574] [log] [info] Input data finished
[2017-02-14 15:40:02.599] [log] [info] LENGTH_THRESHOLD = 1000
[2017-02-14 15:40:02.599] [log] [info] QUALITY_THRESHOLD = 0.23
[2017-02-14 15:40:02.599] [log] [info] ALN_THRESHOLD = 1000
[2017-02-14 15:40:02.599] [log] [info] MIN_COV = 5
[2017-02-14 15:40:02.599] [log] [info] CUT_OFF = 300
[2017-02-14 15:40:02.599] [log] [info] THETA = 300
[2017-02-14 15:40:02.599] [log] [info] N_ITER = 3
[2017-02-14 15:40:02.600] [log] [info] THETA2 = 0
[2017-02-14 15:40:02.600] [log] [info] N_PROC = 12
[2017-02-14 15:40:02.600] [log] [info] HINGE_SLACK = 1000
[2017-02-14 15:40:02.600] [log] [info] HINGE_TOLERANCE = 150
[2017-02-14 15:40:02.600] [log] [info] KILL_HINGE_OVERLAP_ALLOWANCE = 300
[2017-02-14 15:40:02.600] [log] [info] KILL_HINGE_INTERNAL_ALLOWANCE = 40
[2017-02-14 15:40:02.600] [log] [info] MATCHING_HINGE_SLACK = 200
[2017-02-14 15:40:02.600] [log] [info] MIN_CONNECTED_COMPONENT_SIZE = 8
add data
add data
Error! Wrong format.

/work/lorencm/apps/HINGE/inst/bin/hinge: line 8: 15600 Segmentation fault      draft_assembly $*
/work/lorencm/apps/HINGE/inst/bin/hinge: line 8: 48149 Illegal instruction     correct_head.py $*
fasta2DB: Cannot open ./fruit.draft.pb.fasta for 'r'
# set global options for all zsh shells here
HPC.daligner: Cannot open ./draft.db for 'r'
(null): Could not open database draft
length threshold:4000
/work/lorencm/apps/HINGE/inst/bin/hinge: line 8: 48158 Illegal instruction     get_consensus_gfa.py $*

What did I miss?

Thank you in advance.

Michal

fxia22 commented 7 years ago

it seems scripts are not properly installed, as is shown in the output:

/work/lorencm/apps/HINGE/inst/bin/hinge: line 8: 15594 Illegal instruction     pruning_and_clipping.py $*
/work/lorencm/apps/HINGE/inst/bin/hinge: line 8: 15597 Illegal instruction     get_draft_path.py $*

Can you run /util/build.sh again and paste the output? Thanks

mictadlo commented 7 years ago
> utils/build.sh 
make: Nothing to be done for 'all'.
make: Nothing to be done for 'all'.
make: Nothing to be done for 'all'.
make: Nothing to be done for 'all'.
mkdir: cannot create directory ‘build’: File exists
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   graph
-- Configuring done
-- Generating done
-- Build files have been written to: /work/waterhouse_team/apps/HINGE/build
[  7%] Built target DW_banded
[ 19%] Built target DB
[ 30%] Built target ini
[ 38%] Built target kmer_lookup
[ 46%] Built target PAF
[ 53%] Built target LA
[ 61%] Built target falcon
[ 69%] Built target LAInterface
[ 76%] Built target consensus
[ 92%] Built target draft_assembly
[ 92%] Built target Reads_filter
[100%] Built target hinging
[ 11%] Built target ini
[ 23%] Built target DB
[ 30%] Built target PAF
[ 38%] Built target LA
[ 46%] Built target LAInterface
[ 53%] Built target kmer_lookup
[ 61%] Built target DW_banded
[ 69%] Built target falcon
[ 76%] Built target Reads_filter
[ 84%] Built target consensus
[ 92%] Built target draft_assembly
[100%] Built target hinging
Install the project...
-- Install configuration: ""
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/parse_read.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/pruning_and_clipping.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/draw2_pileup_w_repeat.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/repeat_annotate_reads.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/longest_path.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/draft_assembly_not_perfect.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/download_NCTC_pipeline.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/draft_assembly.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/get_NCTC_json.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/draw2.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/compute_n50_from_draft.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/parallel_draw_large.sh
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/condense_graph.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/get_draft_path_norevcomp.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/pipeline_consensus_norevcomp.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/add_groundtruth.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/parse_alignment.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/condense_graph_and_annotate.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/run_mapping2.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/create_bandage_file.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/pipeline_nctc.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/draw_pileup_region.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/get_draft_annotation.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/pipeline_consensus.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/unitig.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/correct_head.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/condense_graph_with_gt.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/interface_utils.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/get_draft_path.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/condense_graph_create_gfa_compute_n50.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/create_hgraph_nogt.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/draw2_pileup.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/run_mapping.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/connected.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/random_condensation.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/merge_hinges.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/draw2_pileup_region.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/condense_graph_annotate_clip_ends.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/create_hgraph.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/get_consensus_gfa.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/run_parse_read.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/pileup.ipynb
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/clip_ends.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/parse.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/run_parse_alignment.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/parallel_draw.sh
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/add_groundtruth_json.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/parse_qv.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/run_mapping3.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/Visualise_graph.py
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/bin/hinge
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/file_helper.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/os.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/spdlog_impl.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/logger_impl.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/null_mutex.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/async_logger_impl.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/mpmc_bounded_q.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/async_log_helper.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/pattern_formatter_impl.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/registry.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/details/log_msg.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/spdlog.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/common.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/fmt
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/fmt/ostr.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/fmt/fmt.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/fmt/bundled
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/fmt/bundled/format.cc
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/fmt/bundled/format.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/fmt/bundled/ostream.cc
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/fmt/bundled/printf.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/fmt/bundled/ostream.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/formatter.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/syslog_sink.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/null_sink.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/android_sink.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/base_sink.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/dist_sink.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/file_sinks.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/sink.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/msvc_sink.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/stdout_sinks.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/ostream_sink.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/sinks/ansicolor_sink.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/logger.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/tweakme.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/include/spdlog/async_logger.h
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/cmake/spdlog/spdlogConfig.cmake
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/cmake/spdlog/spdlogConfigVersion.cmake
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/pkgconfig/spdlog.pc
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/cmake/spdlog/spdlogTargets.cmake
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/Reads_filter
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/draft_assembly
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/consensus
-- Up-to-date: /work/waterhouse_team/apps/HINGE/inst/lib/hinge/hinging
govinda-kamath commented 7 years ago

Can you try

python path/to/hinge/scripts/pruning_and_clipping.py fruit.edges.hinges fruit.hinge.list 1
python path/to/hinge/scripts/get_draft_path.py $PWD fruit fruit1.G2.graphml
mictadlo commented 7 years ago

Hi, I ran

/work/lorencm/apps/HINGE> source utils/setup.sh
/work/lorencm/apps/HINGE> cd data/fruit/
/work/lorencm/apps/HINGE/data/fruit> ls
/work/lorencm/apps/HINGE/data/fruit> python ../../scripts/pruning_and_clipping.py fruit.edges.hinges fruit.hinge.list 1
Traceback (most recent call last):
  File "../../scripts/pruning_and_clipping.py", line 15, in <module>
    import configparser
ImportError: No module named configparser

What did I miss?

Thank you in advance,

Michal

govinda-kamath commented 7 years ago

Hi Michal,

You need to install the configparser package. Something like

pip install configparser

should work.

mictadlo commented 7 years ago

it worked, which graphml file should I choose for get_draft_path.py?

> ls -1 *.graphml
fruit1.G00.graphml
fruit1.G0.graphml
fruit1.G1.graphml
fruit1.G2c.graphml
fruit1.G2.graphml
fruit1.G2s.graphml
fruit1.Gc.graphml
fruit1.Gs.graphml

Thank you in advance.

Michal

govinda-kamath commented 7 years ago

Please use

fruit1.G2.graphml