Skip to content

how can i generate a seed gam format and give it into GraphAligner ? #112

@shihjimmy

Description

@shihjimmy

I generate sequences using pbsim3 and based on the pbsim3 output, I get the corresponding subgraph from the genome graph

Hence, I have my subgraph's: start id / offset in the graph, and I want to put those info directly to GraphAligner, so that it can skip the seeding step and do alignment only, but I encounter some problem:

By the way, the parameter --seeds-first-full-rows is not valid to use, it tells me this option doesn't exist, why ?

Below is my code for generating gam file , Is there anything wrong ??

def generate_gam_format(seq_name, start_node):

# Create a Position message
alignment_position = vg_pb2.Position(
    node_id=start_node,
    offset=0,
    is_reverse=False,
)

# Create a Mapping message using the Position
alignment_mapping = vg_pb2.Mapping(
    position=alignment_position
)

# Wrap the alignment_mapping in a list as the Path expects an iterable (list)
alignment_path = vg_pb2.Path(
    mapping=[alignment_mapping]  # Pass the mapping as a list
)

# Create the Alignment message
alignment = vg_pb2.Alignment(
    path=alignment_path, 
    name=seq_name,
    query_position=0,
)

return alignment

Here is the result:

the ALIGNMENT message I print out look like this:

Alignment: path {
mapping {
position {
node_id: 3120591
}
}
}
name: "S1_4557"

And Here is the execution result:

Load graph from ./out_trim_10k/chr1_S1_19915.gfa
Build alignment graph
Load seeds from ./out_trim_10k/chr1_S1_19915_gam_file.gam
0 seeds
Seeds from file
Seed cluster size 1
Extend up to 5 seed clusters
Alignment bandwidth 35
Clip alignment ends with identity < 66%
X-drop DP score cutoff 14705
Backtrace from 10 highest scoring local maxima per cluster
write alignments to test.gaf
Align
Alignment finished
Input reads: 1 (15976bp)
Seeds found: 0
Seeds extended: 0
Reads with a seed: 0 (0bp)
Reads with an alignment: 0 (0bp)
Alignments: 0 (0bp)
End-to-end alignments: 0 (0bp)

Could you help me fix this out ?
I really need GraphAligner to do this ,thank you for reading

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions