cmdcolin / mafviewer

A JBrowse plugin to view multiple alignment format (MAF) files
26 stars 4 forks source link

Empty outputs when using Mafviewer #3

Closed cganote closed 7 years ago

cganote commented 7 years ago

Hi Colin, I'm having some issues getting the mafviewer configured for my JBrowse instance. I'm not sure what I did wrong, looking at your instructions and the test set that you provided with MAFViewer. I'll try to walk you through what I've done: // Coming from mummer, so who knows? delta2maf one.fdelta > one.maf perl mafviewer-0.2.0/bin/maf2bed.pl somename < one.maf > one.bed bgzip one.bed tabix -p bed one.gz

I put the following in my trackList.conf: { "samples" : [ "somename" ], "storeClass" : "MAFViewer/Store/SeqFeature/MAF", "urlTemplate" : "tracks/maf/one.bed.gz", "type" : "MAFViewer/View/Track/MAF", "label" : "MAF" }, { "label" : "MAF CF", "type" : "CanvasFeatures", "urlTemplate" : "tracks/maf/one.bed.gz", "storeClass" : "JBrowse/Store/SeqFeature/BEDTabix" }, ], "plugins" : [ "MAFViewer", "HideTrackLabels" ], ... I don't get any errors according to firebug/dev tools, but the track is empty even though I know there are alignments in the region selected. Looking at my maf file, I see: a score=91161 s C13729 98027 91162 + 301471 tgacagg...

In the bed.gz file, I have: 0 0 somename_1 1 C13729:98027:91162:+:301471:tgacagg... The C13729 there is the contig that the alignment belongs to. It is one of many, many contigs. The .tbi file is only one 'block', not very big at all. What do you think might be going on?

cmdcolin commented 7 years ago

Hey awesome to hear the progress for trying this out. The most common reason for things being blank is that the reference sequence name in the track doesn't match the FASTA files name e.g. chr1 vs chrom1 are different. Wanna check that first?

cganote commented 7 years ago

As far as I can tell, my fasta reference uses the same name for the contigs:

C13729 0.0 AAATACACAAAA.. Unless I'm mistaking what you are saying.

cmdcolin commented 7 years ago

Hmm I mean to say that the first column of the outputted bed file should match the chromosome name that you are viewing in the genome browser

Also in my test data the maf file had an alignment line for the organism I was viewing, e.g. the maf has a line for c elegans and I was viewing c elegans. Maybe the mummer delta2maf program did not produce this? I have been interested in mummer and could maybe check it out

cmdcolin commented 7 years ago

I was able to go from a delta2maf file to a workable MAFViewer track so that at least confirms a little bit for me that it's possible :)

I can try and look through what you were saying again and see what's going on.

If you have your MAF file and resulting bed file it might help

cmdcolin commented 7 years ago

It might also just be worth making some better parser for the delta format...it seems like the delta2maf program doesn't really exist anymore except in the linux package of mummer

cmdcolin commented 7 years ago

Any updates on this? As noted, I did get delta2maf track to load in a simple test case, but I'd be interested if your setup needs help still!

cmdcolin commented 7 years ago

I am gonna close this for now. I think in the future I may try to make a more dedicated delta file viewer anyways. If you have continued issues with this feel free to report back here!

cmdcolin commented 7 years ago

I added additional notes to the readme about using with delta2maf program (and --format=maf from lastz)

jdamas13 commented 1 year ago

I was having the same issue, where the bed file created with maf2bed.pl was missing the chromosome field. I found that this was because lines 19 and 20 of the script had a space hardcoded for splitting each MAFfile line and looking for reference genome lines. Because my MAF file is separated by tabs, these steps were not being computed. Replacing the space with the perl regex "\s+" did the trick for me (edited lines below).

my @line = split('\s+');
if (/^s\s+$ARGV[0]/) {
cmdcolin commented 1 year ago

@jdamas13 thanks for noting this, added this change to the repo!