I just realized this list is configure with reply-to to the sender,
I'm copying my answer of this email that I intended to send to the
list.
--
Carlos Javier Borroto
Baltimore, MD



On Thu, Feb 24, 2011 at 1:05 PM, Carlos Javier Borroto
<[email protected]> wrote:
> On Thu, Feb 24, 2011 at 12:21 PM, Hiram Clawson <[email protected]> wrote:
>> Good Morning Carlos:
>>
>> Here is an alternative procedure to create a coverage graph
>> for a bam file:
>>
>> https://lists.soe.ucsc.edu/pipermail/genome/2010-December/024318.html
>>
>
> I tried this, but is failing on Ubuntu Lucid:
> samtools pileup mybam.sorted.bam         | perl -pe '($c, $start,
> undef, $depth) = split; \
>                    if ($c ne $lastC || $start != $lastStart+1) { \
>                      print "fixedStep chrom=chr$c start=$start step=1
> span=1\n"; \
>                    } \
>                    $_ = "$depth\n"; \
>                    ($lastC, $lastStart) = ($c, $start);'
> syntax error at -e line 2, near "if"
> syntax error at -e line 6, near ";}"
>
> My perl skills aren't that good, I even tried to move it to a file and
> I got rid of the syntax error, but the script only prints the first
> line. This is the file I created.
> pileupToWiggle.pl:
>
> #!/usr/bin/perl
>
> ($c, $start, undef, $depth) = split;
> if ($c ne $lastC || $start != $lastStart+1) {
>  print "fixedStep chrom=chr$c start=$start step=1 span=1\n";
> }
> $_ = "$depth\n";
> ($lastC, $lastStart) = ($c, $start);
>
> And I tried to use it like this:
> $ samtools pileup mybam.sorted.bam | pileupToWiggle.pl
> fixedStep chrom=chr start= step=1 span=1
>
> Would be nice to get it to work, any further help?
>
>> For assistance with BEDTools, please consult the bedTools project:
>> http://code.google.com/p/bedtools/
>>
>
> I thought the problem could had been in the way I was declaring my
> track, that there was an option to get it to display the data in the
> way I wanted, but you are right, I should have gone to BEBTools
> project website.
>
>> Can you intersect your graph with 'NOT gap' in the table browser
>> to display the graph in areas that are not gap ?
>>
>
> This I did not understand, I'm very new to the Genome Browser.
>
>> --Hiram
>
> Thanks for your comments,
> --
> Carlos Javier Borroto
> Baltimore, MD
>

_______________________________________________
Genome maillist  -  [email protected]
https://lists.soe.ucsc.edu/mailman/listinfo/genome

Reply via email to