AlgoLab / RecGraph

Optimal sequence-to-graph alignment with recombinations
MIT License
24 stars 2 forks source link

How to interprete the output information #8

Open hangsuUNC opened 3 months ago

hangsuUNC commented 3 months ago

Hi,

I tried the program using the files in the example folder. The output is listed as follows. Is this something expected? How to interprete this output?

image

Thanks,

Hang

gdv commented 3 months ago

May you please provide us how you have installed recgraph and the complete command line that you have used to run the program?

hangsuUNC commented 3 months ago

Installation command:

git clone https://github.com/AlgoLab/RecGraph.git
cd RecGraph
cargo build --release

commandline: cargo run --release ./example/reads.fa ./example/graph.gfa

Thanks!

gdv commented 3 months ago

You need to use the -m option to determine the type of alignment you want to compute. For example

target/release/recgraph -m 9 ./example/reads.fa ./example/graph.gfa

if you want to allow recombinations. See https://github.com/AlgoLab/RecGraph#alignment-modes

Best regards

hangsuUNC commented 3 months ago

That works! Thanks so much!

gdv commented 3 months ago

We are going to release the new version soon, which is way faster.

hangsuUNC commented 3 months ago

When I use the api.rs provided in this crate, I found the same output issues when using the functions as follows:

        let score_matrix = create_score_matrix_f32(Some(0), Some(1), None);
        let alignment = align_global_no_gap(&read_seq_upper, &g, Some(h_tuple), Some(score_matrix), Some(0.1));

        let gaf_output = alignment.to_string();
        gaf_file.write_all(gaf_output.as_bytes()).expect("Unable to write to file");

Is there any parameters that I should set here?

Thanks,

Hang

dcmonti commented 3 months ago

You can try by setting the last parameter of align_global_no_gap() to Some(1.0), it should work