[Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

[Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Keiran Raine
Hi,

I think I've found a couple of bugs in the read-pair view.

I've got some reads changing from the positive strand colour to the negative strand partway through a read, see attached images and bam.

The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

Another thing is that although callbacks are now working for perl module inclusion, it seems that inline definitions are now not working, e.g.
....
#include /nfs/cancer_ref01/gbrowse/pg_config/includes/init_code.conf
....
<init_code.conf>
init_code = sub bam_tooltip {
    my $f = shift;
    my $name = $f->name;
    my $map_q = $f->score....
.....
</init_code.conf>

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a compa ny registered in England with number 2742969, whose registered office is 2 15 Euston Road, London, NW1 2BE.






------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse

Picture 1.png (8K) Download Attachment
Picture 2.png (117K) Download Attachment
strand_switch.bam (25K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Lincoln Stein
Hi Keiran,

Are you using fastCGI to get the TAM reads? I've just identified a bad interaction with the samtools library and fastCGI when you try to do that.

Lincoln

On Fri, May 14, 2010 at 10:03 AM, Keiran Raine <[hidden email]> wrote:
Hi,

I think I've found a couple of bugs in the read-pair view.

I've got some reads changing from the positive strand colour to the negative strand partway through a read, see attached images and bam.

The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

Another thing is that although callbacks are now working for perl module inclusion, it seems that inline definitions are now not working, e.g.
....
#include /nfs/cancer_ref01/gbrowse/pg_config/includes/init_code.conf
....
<init_code.conf>
init_code = sub bam_tooltip {
    my $f = shift;
    my $name = $f->name;
    my $map_q = $f->score....
.....
</init_code.conf>

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.









--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Keiran Raine
This occurs in standard cgi-bin mode.  We only have modperl installed, is it likely to be generally better to move over to fastcgi now?

Regards.

On 14 May 2010, at 15:48, Lincoln Stein wrote:

Hi Keiran,

Are you using fastCGI to get the TAM reads? I've just identified a bad interaction with the samtools library and fastCGI when you try to do that.

Lincoln

On Fri, May 14, 2010 at 10:03 AM, Keiran Raine <[hidden email]> wrote:
Hi,

I think I've found a couple of bugs in the read-pair view.

I've got some reads changing from the positive strand colour to the negative strand partway through a read, see attached images and bam.

The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

Another thing is that although callbacks are now working for perl module inclusion, it seems that inline definitions are now not working, e.g.
....
#include /nfs/cancer_ref01/gbrowse/pg_config/includes/init_code.conf
....
<init_code.conf>
init_code = sub bam_tooltip {
    my $f = shift;
    my $name = $f->name;
    my $map_q = $f->score....
.....
</init_code.conf>

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.









--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a compa ny registered in England with number 2742969, whose registered office is 2 15 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Lincoln Stein
Hi Keiran,

In standard CGI mode I can't reproduce the bug in which you only get TAM lines for reads that are fully contained within the region, and don't get lines for those that either overlap or span the region. Are the reads grouped into pairs? This shouldn't matter, but will help me track it down.

I think the FastCGI version is faster and more stable than mod_perl, which is prone to memory leaks. Unfortunately the TAM dumping isn't working under FastCGI in version 2.06. I've just fixed this, and will be working on 2.07.

I'm going to take a look at the init_code issues now.

Lincoln

On Fri, May 14, 2010 at 11:17 AM, Keiran Raine <[hidden email]> wrote:
This occurs in standard cgi-bin mode.  We only have modperl installed, is it likely to be generally better to move over to fastcgi now?

Regards.

On 14 May 2010, at 15:48, Lincoln Stein wrote:

Hi Keiran,

Are you using fastCGI to get the TAM reads? I've just identified a bad interaction with the samtools library and fastCGI when you try to do that.

Lincoln

On Fri, May 14, 2010 at 10:03 AM, Keiran Raine <[hidden email]> wrote:
Hi,

I think I've found a couple of bugs in the read-pair view.

I've got some reads changing from the positive strand colour to the negative strand partway through a read, see attached images and bam.

The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

Another thing is that although callbacks are now working for perl module inclusion, it seems that inline definitions are now not working, e.g.
....
#include /nfs/cancer_ref01/gbrowse/pg_config/includes/init_code.conf
....
<init_code.conf>
init_code = sub bam_tooltip {
    my $f = shift;
    my $name = $f->name;
    my $map_q = $f->score....
.....
</init_code.conf>

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.









--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Lincoln Stein
In reply to this post by Keiran Raine
We're not doing very well today, I can't reproduce this bug either:
 
....
#include /nfs/cancer_ref01/gbrowse/pg_config/includes/init_code.conf
....
<init_code.conf>
init_code = sub bam_tooltip {
    my $f = shift;
    my $name = $f->name;
    my $map_q = $f->score....
.....
</init_code.conf>

I'm assuming that you are then referring to this in a callback like so?

 balloon hover = \&bam_tooltip

I'll try the strand switching bug now. Maybe we'll get lucky.

Lincoln


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.









--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Keiran Raine
In reply to this post by Lincoln Stein
Sorry, I was talking about the strand switching issue in response to this.  this is fin under standard cgi, but not modperl (which is just not responding now)

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:21, Lincoln Stein wrote:

Hi Keiran,

In standard CGI mode I can't reproduce the bug in which you only get TAM lines for reads that are fully contained within the region, and don't get lines for those that either overlap or span the region. Are the reads grouped into pairs? This shouldn't matter, but will help me track it down.

I think the FastCGI version is faster and more stable than mod_perl, which is prone to memory leaks. Unfortunately the TAM dumping isn't working under FastCGI in version 2.06. I've just fixed this, and will be working on 2.07.

I'm going to take a look at the init_code issues now.

Lincoln

On Fri, May 14, 2010 at 11:17 AM, Keiran Raine <[hidden email]> wrote:
This occurs in standard cgi-bin mode.  We only have modperl installed, is it likely to be generally better to move over to fastcgi now?

Regards.

On 14 May 2010, at 15:48, Lincoln Stein wrote:

Hi Keiran,

Are you using fastCGI to get the TAM reads? I've just identified a bad interaction with the samtools library and fastCGI when you try to do that.

Lincoln

On Fri, May 14, 2010 at 10:03 AM, Keiran Raine <[hidden email]> wrote:
Hi,

I think I've found a couple of bugs in the read-pair view.

I've got some reads changing from the positive strand colour to the negative strand partway through a read, see attached images and bam.

The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

Another thing is that although callbacks are now working for perl module inclusion, it seems that inline definitions are now not working, e.g.
....
#include /nfs/cancer_ref01/gbrowse/pg_config/includes/init_code.conf
....
<init_code.conf>
init_code = sub bam_tooltip {
    my $f = shift;
    my $name = $f->name;
    my $map_q = $f->score....
.....
</init_code.conf>

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.









--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a compa ny registered in England with number 2742969, whose registered office is 2 15 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Keiran Raine
In reply to this post by Lincoln Stein
Actually I was doing

balloon hover = sub { bam_tooltip(shift) }

Is this incorrect?

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:28, Lincoln Stein wrote:

We're not doing very well today, I can't reproduce this bug either:
 
....
#include /nfs/cancer_ref01/gbrowse/pg_config/includes/init_code.conf
....
<init_code.conf>
init_code = sub bam_tooltip {
    my $f = shift;
    my $name = $f->name;
    my $map_q = $f->score....
.....
</init_code.conf>

I'm assuming that you are then referring to this in a callback like so?

 balloon hover = \&bam_tooltip

I'll try the strand switching bug now. Maybe we'll get lucky.

Lincoln


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.









--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a compa ny registered in England with number 2742969, whose registered office is 2 15 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Lincoln Stein
In reply to this post by Keiran Raine
Yes, I am having the same problems under mod_perl that I had under FastCGI before the recent fix.

Lincoln

On Fri, May 14, 2010 at 11:31 AM, Keiran Raine <[hidden email]> wrote:
Sorry, I was talking about the strand switching issue in response to this.  this is fin under standard cgi, but not modperl (which is just not responding now)


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:21, Lincoln Stein wrote:

Hi Keiran,

In standard CGI mode I can't reproduce the bug in which you only get TAM lines for reads that are fully contained within the region, and don't get lines for those that either overlap or span the region. Are the reads grouped into pairs? This shouldn't matter, but will help me track it down.

I think the FastCGI version is faster and more stable than mod_perl, which is prone to memory leaks. Unfortunately the TAM dumping isn't working under FastCGI in version 2.06. I've just fixed this, and will be working on 2.07.

I'm going to take a look at the init_code issues now.

Lincoln

On Fri, May 14, 2010 at 11:17 AM, Keiran Raine <[hidden email]> wrote:
This occurs in standard cgi-bin mode.  We only have modperl installed, is it likely to be generally better to move over to fastcgi now?

Regards.

On 14 May 2010, at 15:48, Lincoln Stein wrote:

Hi Keiran,

Are you using fastCGI to get the TAM reads? I've just identified a bad interaction with the samtools library and fastCGI when you try to do that.

Lincoln

On Fri, May 14, 2010 at 10:03 AM, Keiran Raine <[hidden email]> wrote:
Hi,

I think I've found a couple of bugs in the read-pair view.

I've got some reads changing from the positive strand colour to the negative strand partway through a read, see attached images and bam.

The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

Another thing is that although callbacks are now working for perl module inclusion, it seems that inline definitions are now not working, e.g.
....
#include /nfs/cancer_ref01/gbrowse/pg_config/includes/init_code.conf
....
<init_code.conf>
init_code = sub bam_tooltip {
    my $f = shift;
    my $name = $f->name;
    my $map_q = $f->score....
.....
</init_code.conf>

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.









--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Lincoln Stein
In reply to this post by Keiran Raine
Ok, you're doing it this way? It isn't incorrect, but just a bit redundant. I understand the scenario now, have reproduced the problem and will be committing a Bio::Graphics fix to address this.

Lincoln

On Fri, May 14, 2010 at 11:32 AM, Keiran Raine <[hidden email]> wrote:
Actually I was doing

balloon hover = sub { bam_tooltip(shift) }

Is this incorrect?


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:28, Lincoln Stein wrote:

We're not doing very well today, I can't reproduce this bug either:
 
....
#include /nfs/cancer_ref01/gbrowse/pg_config/includes/init_code.conf
....
<init_code.conf>
init_code = sub bam_tooltip {
    my $f = shift;
    my $name = $f->name;
    my $map_q = $f->score....
.....
</init_code.conf>

I'm assuming that you are then referring to this in a callback like so?

 balloon hover = \&bam_tooltip

I'll try the strand switching bug now. Maybe we'll get lucky.

Lincoln


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.









--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Lincoln Stein
In reply to this post by Keiran Raine

The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

I'm guessing the problem is that if you have read pairs, the download function only returns information on the reads that overlap the view, right? If you have one member of a pair in range and the other read is outside the view, you'll get the first and not the last?

This will be a mite tricky to fix without eating up a lot of memory when you try to dump large regions.

Lincoln


--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Keiran Raine
Hi,

Actually what I was seeing was for a region of 50 bp with reads of 76 bp I was getting a SAM file with headers and no records.  When I tried with cgi and not using modperl I got the expected file.  I don't expect to get the mate read if it is not in the view.

Regards,

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:52, Lincoln Stein wrote:


The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

I'm guessing the problem is that if you have read pairs, the download function only returns information on the reads that overlap the view, right? If you have one member of a pair in range and the other read is outside the view, you'll get the first and not the last?

This will be a mite tricky to fix without eating up a lot of memory when you try to dump large regions.

Lincoln


--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a compa ny registered in England with number 2742969, whose registered office is 2 15 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Lincoln Stein
Hi Keiran,

Ok, this is the modperl bug. I've fixed it (I wrote a workaround into Bio::DB::Samtools actually).

With respect to your strand switching bug, I can't reproduce it on the BAM file you sent; I'll keep testing.

Lincoln

On Fri, May 14, 2010 at 5:27 PM, Keiran Raine <[hidden email]> wrote:
Hi,

Actually what I was seeing was for a region of 50 bp with reads of 76 bp I was getting a SAM file with headers and no records.  When I tried with cgi and not using modperl I got the expected file.  I don't expect to get the mate read if it is not in the view.

Regards,


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:52, Lincoln Stein wrote:


The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

I'm guessing the problem is that if you have read pairs, the download function only returns information on the reads that overlap the view, right? If you have one member of a pair in range and the other read is outside the view, you'll get the first and not the last?

This will be a mite tricky to fix without eating up a lot of memory when you try to dump large regions.

Lincoln


--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Lincoln Stein
Here's a picture of the alignment I get. I don't actually have hg19 on my development machine, so I munged the file a bit so that all coordinates start at one.

Lincoln

On Fri, May 14, 2010 at 5:33 PM, Lincoln Stein <[hidden email]> wrote:
Hi Keiran,

Ok, this is the modperl bug. I've fixed it (I wrote a workaround into Bio::DB::Samtools actually).

With respect to your strand switching bug, I can't reproduce it on the BAM file you sent; I'll keep testing.

Lincoln


On Fri, May 14, 2010 at 5:27 PM, Keiran Raine <[hidden email]> wrote:
Hi,

Actually what I was seeing was for a region of 50 bp with reads of 76 bp I was getting a SAM file with headers and no records.  When I tried with cgi and not using modperl I got the expected file.  I don't expect to get the mate read if it is not in the view.

Regards,


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:52, Lincoln Stein wrote:


The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

I'm guessing the problem is that if you have read pairs, the download function only returns information on the reads that overlap the view, right? If you have one member of a pair in range and the other read is outside the view, you'll get the first and not the last?

This will be a mite tricky to fix without eating up a lot of memory when you try to dump large regions.

Lincoln


--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse

13-1..150.png (428K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Keiran Raine
In reply to this post by Lincoln Stein
Try this one.  Lower half of image shows 12 instances of blue->yellow

1:145313054..145313063


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a compa ny registered in England with number 2742969, whose registered office is 2 15 Euston Road, London, NW1 2BE.






On 14 May 2010, at 22:33, Lincoln Stein wrote:

Hi Keiran,

Ok, this is the modperl bug. I've fixed it (I wrote a workaround into Bio::DB::Samtools actually).

With respect to your strand switching bug, I can't reproduce it on the BAM file you sent; I'll keep testing.

Lincoln

On Fri, May 14, 2010 at 5:27 PM, Keiran Raine <[hidden email]> wrote:
Hi,

Actually what I was seeing was for a region of 50 bp with reads of 76 bp I was getting a SAM file with headers and no records.  When I tried with cgi and not using modperl I got the expected file.  I don't expect to get the mate read if it is not in the view.

Regards,


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:52, Lincoln Stein wrote:


The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

I'm guessing the problem is that if you have read pairs, the download function only returns information on the reads that overlap the view, right? If you have one member of a pair in range and the other read is outside the view, you'll get the first and not the last?

This will be a mite tricky to fix without eating up a lot of memory when you try to dump large regions.

Lincoln


--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse

mt_ex_bam_1_145313054..145313063.bam (9K) Download Attachment
image.png (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Lincoln Stein
Hi Keiran,

In the screenshot you sent I'm seeing multiple shades of lavender and yellow, implying that your bgcolor callback is more complicated than just switching on the strand. Could you send me the callback code as well?

Lincoln

On Fri, May 14, 2010 at 5:43 PM, Keiran Raine <[hidden email]> wrote:
Try this one.  Lower half of image shows 12 instances of blue->yellow

1:145313054..145313063


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.






On 14 May 2010, at 22:33, Lincoln Stein wrote:

Hi Keiran,

Ok, this is the modperl bug. I've fixed it (I wrote a workaround into Bio::DB::Samtools actually).

With respect to your strand switching bug, I can't reproduce it on the BAM file you sent; I'll keep testing.

Lincoln

On Fri, May 14, 2010 at 5:27 PM, Keiran Raine <[hidden email]> wrote:
Hi,

Actually what I was seeing was for a region of 50 bp with reads of 76 bp I was getting a SAM file with headers and no records.  When I tried with cgi and not using modperl I got the expected file.  I don't expect to get the mate read if it is not in the view.

Regards,


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:52, Lincoln Stein wrote:


The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

I'm guessing the problem is that if you have read pairs, the download function only returns information on the reads that overlap the view, right? If you have one member of a pair in range and the other read is outside the view, you'll get the first and not the last?

This will be a mite tricky to fix without eating up a lot of memory when you try to dump large regions.

Lincoln


--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>





--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Keiran Raine
Here is the track config and the relevant components of the module containing the callbacks:

[mt_ex_bam]
feature       = read_pair
indel_color    = green
glyph         = segments
draw_target    = 1
show_mismatch  = 1
mismatch_color = red
database       = mt_ex_bam
bgcolor       = sub {&Sanger::CGP::WholeGenome::GB_Init_Code::qual_fade(shift)}
height        = 5
label         = 0
bump          = fast
show_mismatch= 800
connector    = sub {
                  my $glyph = pop;
                  return $glyph->level == 0 ? 'dashed' : 'solid';
               }
maxdepth     = 2
box_subparts = 2
key            = PD4087a (ex)
category       = 2. BAM Tracks
label = 0
balloon hover = sub {&Sanger::CGP::WholeGenome::GB_Init_Code::bam_tooltip(shift)}



sub blue_fade {
  my $qual = shift;
  #R=0, G=0, B=255, increase red and green up to 204 to progress to very pale blue
  if($qual == 60) {
    return chr(35).'0000FF';
  }
  else {
    my $faded = 204 - int($qual * 3.4); # max score 60 (204/60=3.4)
    #print STDERR "qual: $qual, fade: $faded\n";
    return chr(35) . sprintf("%X", $faded) .
            sprintf("%X", $faded) . "FF";
  }
}

sub yellow_fade {
  my $qual = shift;
  #R=255, G=255, B=0, increase blue up to 204 to progress to very pale yellow
  if($qual == 60) {
    return chr(35).'FFFF00';
  }
  else {
    my $faded = 204 - int($qual * 3.4);
    #print STDERR "qual: $qual, fade: $faded\n";
    return chr(35) . "FFFF".sprintf("%X", $faded);
  }
}

sub qual_fade {
  my $f = shift;
  if($f->strand == 1) {
    return blue_fade($f->qual);
  }
  else {
    return yellow_fade($f->qual);
  }
}

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 22:48, Lincoln Stein wrote:

Hi Keiran,

In the screenshot you sent I'm seeing multiple shades of lavender and yellow, implying that your bgcolor callback is more complicated than just switching on the strand. Could you send me the callback code as well?

Lincoln

On Fri, May 14, 2010 at 5:43 PM, Keiran Raine <[hidden email]> wrote:
Try this one.  Lower half of image shows 12 instances of blue->yellow

1:145313054..145313063


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.






On 14 May 2010, at 22:33, Lincoln Stein wrote:

Hi Keiran,

Ok, this is the modperl bug. I've fixed it (I wrote a workaround into Bio::DB::Samtools actually).

With respect to your strand switching bug, I can't reproduce it on the BAM file you sent; I'll keep testing.

Lincoln

On Fri, May 14, 2010 at 5:27 PM, Keiran Raine <[hidden email]> wrote:
Hi,

Actually what I was seeing was for a region of 50 bp with reads of 76 bp I was getting a SAM file with headers and no records.  When I tried with cgi and not using modperl I got the expected file.  I don't expect to get the mate read if it is not in the view.

Regards,


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:52, Lincoln Stein wrote:


The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

I'm guessing the problem is that if you have read pairs, the download function only returns information on the reads that overlap the view, right? If you have one member of a pair in range and the other read is outside the view, you'll get the first and not the last?

This will be a mite tricky to fix without eating up a lot of memory when you try to dump large regions.

Lincoln


--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>





--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a compa ny registered in England with number 2742969, whose registered office is 2 15 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Lincoln Stein
Hi Keiran,

These places where there is an apparent strand color change are actually two members of the same mate pair that overlap each other. For example, IL14_4041:2:32:1576:611 and its mate map only a few base pairs from each other. I've turned on the strand arrow in the enclosed image to show the relationships.

The way the segments glyph works is to turn off bumping of its internal components so that all the pieces are on the same vertical line. Otherwise the connectors start going off at diagonals and the image gets very messy indeed. I experimented with turning bumping back on, but the multiple alignment code is making assumptions about bumping, so it gets screwed up. How important is this to you to get it fixed, and how would you have mate pairs represented when they are heavily overlapping as in the examples enclosed?

Lincoln

On Fri, May 14, 2010 at 5:58 PM, Keiran Raine <[hidden email]> wrote:
Here is the track config and the relevant components of the module containing the callbacks:

[mt_ex_bam]
feature       = read_pair
indel_color    = green
glyph         = segments
draw_target    = 1
show_mismatch  = 1
mismatch_color = red
database       = mt_ex_bam
bgcolor       = sub {&Sanger::CGP::WholeGenome::GB_Init_Code::qual_fade(shift)}
height        = 5
label         = 0
bump          = fast
show_mismatch= 800
connector    = sub {
                  my $glyph = pop;
                  return $glyph->level == 0 ? 'dashed' : 'solid';
               }
maxdepth     = 2
box_subparts = 2
key            = PD4087a (ex)
category       = 2. BAM Tracks
label = 0
balloon hover = sub {&Sanger::CGP::WholeGenome::GB_Init_Code::bam_tooltip(shift)}



sub blue_fade {
  my $qual = shift;
  #R=0, G=0, B=255, increase red and green up to 204 to progress to very pale blue
  if($qual == 60) {
    return chr(35).'0000FF';
  }
  else {
    my $faded = 204 - int($qual * 3.4); # max score 60 (204/60=3.4)
    #print STDERR "qual: $qual, fade: $faded\n";
    return chr(35) . sprintf("%X", $faded) .
            sprintf("%X", $faded) . "FF";
  }
}

sub yellow_fade {
  my $qual = shift;
  #R=255, G=255, B=0, increase blue up to 204 to progress to very pale yellow
  if($qual == 60) {
    return chr(35).'FFFF00';
  }
  else {
    my $faded = 204 - int($qual * 3.4);
    #print STDERR "qual: $qual, fade: $faded\n";
    return chr(35) . "FFFF".sprintf("%X", $faded);
  }
}

sub qual_fade {
  my $f = shift;
  if($f->strand == 1) {
    return blue_fade($f->qual);
  }
  else {
    return yellow_fade($f->qual);
  }
}

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 22:48, Lincoln Stein wrote:

Hi Keiran,

In the screenshot you sent I'm seeing multiple shades of lavender and yellow, implying that your bgcolor callback is more complicated than just switching on the strand. Could you send me the callback code as well?

Lincoln

On Fri, May 14, 2010 at 5:43 PM, Keiran Raine <[hidden email]> wrote:
Try this one.  Lower half of image shows 12 instances of blue->yellow

1:145313054..145313063


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.






On 14 May 2010, at 22:33, Lincoln Stein wrote:

Hi Keiran,

Ok, this is the modperl bug. I've fixed it (I wrote a workaround into Bio::DB::Samtools actually).

With respect to your strand switching bug, I can't reproduce it on the BAM file you sent; I'll keep testing.

Lincoln

On Fri, May 14, 2010 at 5:27 PM, Keiran Raine <[hidden email]> wrote:
Hi,

Actually what I was seeing was for a region of 50 bp with reads of 76 bp I was getting a SAM file with headers and no records.  When I tried with cgi and not using modperl I got the expected file.  I don't expect to get the mate read if it is not in the view.

Regards,


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:52, Lincoln Stein wrote:


The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

I'm guessing the problem is that if you have read pairs, the download function only returns information on the reads that overlap the view, right? If you have one member of a pair in range and the other read is outside the view, you'll get the first and not the last?

This will be a mite tricky to fix without eating up a lot of memory when you try to dump large regions.

Lincoln


--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>





--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse

13-47..97.png (42K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-gbrowse] GBrowse 2.06, Bio-Graphics 2.08 - couple of bugs?

Keiran Raine
Thanks for investigating that Lincoln,

I'm not actually sure when I removed 'stranded' from the config.  Make things much clearer.

Regards,

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 16 May 2010, at 22:31, Lincoln Stein wrote:

Hi Keiran,

These places where there is an apparent strand color change are actually two members of the same mate pair that overlap each other. For example, IL14_4041:2:32:1576:611 and its mate map only a few base pairs from each other. I've turned on the strand arrow in the enclosed image to show the relationships.

The way the segments glyph works is to turn off bumping of its internal components so that all the pieces are on the same vertical line. Otherwise the connectors start going off at diagonals and the image gets very messy indeed. I experimented with turning bumping back on, but the multiple alignment code is making assumptions about bumping, so it gets screwed up. How important is this to you to get it fixed, and how would you have mate pairs represented when they are heavily overlapping as in the examples enclosed?

Lincoln

On Fri, May 14, 2010 at 5:58 PM, Keiran Raine <[hidden email]> wrote:
Here is the track config and the relevant components of the module containing the callbacks:

[mt_ex_bam]
feature       = read_pair
indel_color    = green
glyph         = segments
draw_target    = 1
show_mismatch  = 1
mismatch_color = red
database       = mt_ex_bam
bgcolor       = sub {&Sanger::CGP::WholeGenome::GB_Init_Code::qual_fade(shift)}
height        = 5
label         = 0
bump          = fast
show_mismatch= 800
connector    = sub {
                  my $glyph = pop;
                  return $glyph->level == 0 ? 'dashed' : 'solid';
               }
maxdepth     = 2
box_subparts = 2
key            = PD4087a (ex)
category       = 2. BAM Tracks
label = 0
balloon hover = sub {&Sanger::CGP::WholeGenome::GB_Init_Code::bam_tooltip(shift)}



sub blue_fade {
  my $qual = shift;
  #R=0, G=0, B=255, increase red and green up to 204 to progress to very pale blue
  if($qual == 60) {
    return chr(35).'0000FF';
  }
  else {
    my $faded = 204 - int($qual * 3.4); # max score 60 (204/60=3.4)
    #print STDERR "qual: $qual, fade: $faded\n";
    return chr(35) . sprintf("%X", $faded) .
            sprintf("%X", $faded) . "FF";
  }
}

sub yellow_fade {
  my $qual = shift;
  #R=255, G=255, B=0, increase blue up to 204 to progress to very pale yellow
  if($qual == 60) {
    return chr(35).'FFFF00';
  }
  else {
    my $faded = 204 - int($qual * 3.4);
    #print STDERR "qual: $qual, fade: $faded\n";
    return chr(35) . "FFFF".sprintf("%X", $faded);
  }
}

sub qual_fade {
  my $f = shift;
  if($f->strand == 1) {
    return blue_fade($f->qual);
  }
  else {
    return yellow_fade($f->qual);
  }
}

Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 22:48, Lincoln Stein wrote:

Hi Keiran,

In the screenshot you sent I'm seeing multiple shades of lavender and yellow, implying that your bgcolor callback is more complicated than just switching on the strand. Could you send me the callback code as well?

Lincoln

On Fri, May 14, 2010 at 5:43 PM, Keiran Raine <[hidden email]> wrote:
Try this one.  Lower half of image shows 12 instances of blue->yellow

1:145313054..145313063


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.






On 14 May 2010, at 22:33, Lincoln Stein wrote:

Hi Keiran,

Ok, this is the modperl bug. I've fixed it (I wrote a workaround into Bio::DB::Samtools actually).

With respect to your strand switching bug, I can't reproduce it on the BAM file you sent; I'll keep testing.

Lincoln

On Fri, May 14, 2010 at 5:27 PM, Keiran Raine <[hidden email]> wrote:
Hi,

Actually what I was seeing was for a region of 50 bp with reads of 76 bp I was getting a SAM file with headers and no records.  When I tried with cgi and not using modperl I got the expected file.  I don't expect to get the mate read if it is not in the view.

Regards,


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100




On 14 May 2010, at 16:52, Lincoln Stein wrote:


The download function for 'get reads in region' does not retrieve reads that span or start/end outside of the view (so not comparable to samtools view and can't be used to make nice little sam/bam files as test cases).

I'm guessing the problem is that if you have read pairs, the download function only returns information on the reads that overlap the view, right? If you have one member of a pair in range and the other read is outside the view, you'll get the first and not the last?

This will be a mite tricky to fix without eating up a lot of memory when you try to dump large regions.

Lincoln


--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>





--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.



--
Lincoln D. Stein
Director, Informatics and Biocomputing Platform
Ontario Institute for Cancer Research
101 College St., Suite 800
Toronto, ON, Canada M5G0A3
416 673-8514
Assistant: Renata Musa <[hidden email]>
<13-47..97.png>


-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a compa ny registered in England with number 2742969, whose registered office is 2 15 Euston Road, London, NW1 2BE.

------------------------------------------------------------------------------


_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse