Biostar Beta. Not for public use.
How to use samtools tview goto with long reference sequence name
1
Entering edit mode
19 months ago
quokka • 10

I'm sorry if the answer to this is blatantly obvious...

I'm trying to jump to a sequence region in samtools tview with the (g)oto command. The problem is I can't enter the full command due to size restrictions of the input section.

I want to enter:

Goto: d62ff96e-317e-46d3-92b5-f5a4b329694f:3598

but I can only enter:

Goto: d62ff96e-317e-46d3-92b5-f5a4b329694f:359

Any tips?

ADD COMMENTlink
0
Entering edit mode
13 months ago
France/Nantes/Institut du Thorax - INSE…

edit the file https://github.com/samtools/samtools/blob/50a0bafe616a822df2f98dc4635840e430cbea45/bam_tview.h

change https://github.com/samtools/samtools/blob/50a0bafe616a822df2f98dc4635840e430cbea45/bam_tview.h#L80

#define TV_MAX_GOTO 40

to a larger value like

#define TV_MAX_GOTO 50

and recompile samtools

ADD COMMENTlink
0
Entering edit mode

Ah. Excellent. Not so obvious then. Thanks!

ADD REPLYlink
0
Entering edit mode

Hi, If this was the answer to your question please accept it as a right answer.

enter image description here

ADD REPLYlink
0
Entering edit mode
13 months ago
WCIP | Glasgow | UK

A shameless plug... If you use samtools tview you may be interested in ASCIIGenome

ADD COMMENTlink
0
Entering edit mode
13 months ago
John Marshall ♦ 1.5k
Glasgow, Scotland

Sadly this text entry box is too narrow for unfortunate contigs named via UUIDs. See PR samtools/samtools#968.

In the meantime, there is a workaround to jump to the position you're after using a vanilla samtools tview build: the goto command accepts =1234 to jump to a position on the current chromosome. So you can jump to where you want in two hops:

  1. Goto d62ff96e-317e-46d3-92b5-f5a4b329694f which takes you to the start of that contig;
  2. Goto =3598 to jump to the desired position.
ADD COMMENTlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1