Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • apfejes
    replied
    Thanks - pileup also fits that description. Variety is the spice of life. (=

    Though, just to clarify, I was just looking to point Alberto in the right direction, and had forgotten about pileup. (I don't use pileup, but I do use Picard.)

    Leave a comment:


  • lh3
    replied
    @Alberto Magi

    What you are looking for is "pileup" (http://samtools.sourceforge.net/pileup.shtml). Please also see this page (http://samtools.sourceforge.net/pipe.shtml) about getting pileup in a specified region.

    @apfejes

    Pileup output is not part of Picard, you should be able to get similar things from GATK (http://www.broadinstitute.org/gsa/wi...alysis_Toolkit)

    Leave a comment:


  • apfejes
    replied
    That sounds suspiciously similar to a wig file, although, the format is not quite what you're expecting. I assume what you're looking for would look like:

    chr1 1 0
    chr2 2 1
    chr2 3 1
    ... etc

    The problem is that such file would be incredibly inefficient, hence the wig file, which will provide a more compact version. (Presumably the "variable width" format is what you're looking for.)

    Although not quite the same, FindPeaks 4.0 (Yes, sorry, I'm plugging my own software) will generate fixedstep format wig files from sam/bam files, which would give you a similar result, which would look like:

    fixedStep chrom=chr22 start=16653550 step=1
    6
    7
    8
    9
    10
    11
    ......

    where you get a single line that tells you the start point (chr and position), and then the coverage of each position after that.

    There are plenty of other wig file generators out there as well - although I'm not sure how many of them read bam/sam yet.

    Cheers

    Leave a comment:


  • Alberto Magi
    replied
    Hi all,

    i need help to obtain read depth of coverage from a .bam file. Does anybody know some tool to automatically obtain a tab-delimited file (with chromosome, position, coverage depth.....) starting from a bam file?
    i wait for suggestions
    thanks a lot

    Alberto

    Leave a comment:


  • nilshomer
    replied
    Originally posted by tgolubch View Post
    Thanks, Nils; I had already tried changing the prefix, but it still seems to fail -- I'll look into it again when I have time.
    Could you post your example (with a download link) to [email protected] so I can take a look?

    Nils

    Leave a comment:


  • nilshomer
    replied
    Originally posted by Jeckow View Post
    Hi nilshomer and thanks for your reply!

    I've sorted and created the indexes but the samtools message remains the same.
    Any other ideas? Do you know if there exists another way to extract a particular chromosomal region from a .bam file?
    Thanks,

    M.
    You could just run "samtools view in.bam | grep chr22" for example. Weird that your merge fails.

    Nils

    Leave a comment:


  • Jeckow
    replied
    Hi nilshomer and thanks for your reply!

    I've sorted and created the indexes but the samtools message remains the same.
    Any other ideas? Do you know if there exists another way to extract a particular chromosomal region from a .bam file?
    Thanks,

    M.

    Leave a comment:


  • tgolubch
    replied
    Thanks, Nils; I had already tried changing the prefix, but it still seems to fail -- I'll look into it again when I have time.

    Leave a comment:


  • houhuabin
    replied
    Originally posted by lh3 View Post
    Picard is well tested. It reports error because it is more rigorous than samtools. This error is actually a bwa problem, not picard. You may try the latest bwa-0.5.2. I believe I have fixed the issue.
    Yes, I used bwa-0.5.0, bwa-0.5.2 have no such bugs at all.

    Excellent wrok!!!

    Leave a comment:


  • nilshomer
    replied
    Originally posted by Jeckow View Post
    Hi,

    I obtained complete genome sequence data in the form of “.bam” alignment files from ftp://ftp-trace.ncbi.nih.gov/1000genomes/ and I tried to extract a sub alignment of a region of chromosome 1 with the "view" command.


    ./samtools view -q 30 -t ../human_b36_male.fa.fai ../NA12878.SLX.maq.SRP000031.2009_08.bam chr1:150,792,101–150,884,101

    I get the following:

    [sam_header_read2] 114 sequences loaded.
    [main_samview] random alignment retrieval only works for indexed BAM files.

    Could anyone help me fix this problem? Thanks a lot.
    M.
    It looks like you either have not sorted the BAM file (samtools sort) or you have you have sorted the BAM file but have not created the index (samtools index).

    Leave a comment:


  • Jeckow
    replied
    Hi,

    I obtained complete genome sequence data in the form of “.bam” alignment files from ftp://ftp-trace.ncbi.nih.gov/1000genomes/ and I tried to extract a sub alignment of a region of chromosome 1 with the "view" command.


    ./samtools view -q 30 -t ../human_b36_male.fa.fai ../NA12878.SLX.maq.SRP000031.2009_08.bam chr1:150,792,101–150,884,101

    I get the following:

    [sam_header_read2] 114 sequences loaded.
    [main_samview] random alignment retrieval only works for indexed BAM files.

    Could anyone help me fix this problem? Thanks a lot.
    M.

    Leave a comment:


  • lh3
    replied
    Picard is well tested. It reports error because it is more rigorous than samtools. This error is actually a bwa problem, not picard. You may try the latest bwa-0.5.2. I believe I have fixed the issue.

    Leave a comment:


  • houhuabin
    replied
    hi heng
    I used bwa to generate a sam file.It works well with samtools, but when I use picard ExampleSamUsage, it reprots Exception:
    Exception in thread "main" net.sf.samtools.SAMFormatException: Error parsing text SAM file. MRNM specified but flags indicate unpaired; File e:\temp\aln.sam; Line 1
    Line: >chrY_1 0 chrY 2154703 37 45M = 2154703 0 ATGGTGGCGAGCGCCTGTAGTCCCAGCTACTCGGGAGGCAGGAGA hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh XT:A:U NM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:45
    at net.sf.samtools.SAMTextReader.reportErrorParsingLine(SAMTextReader.java:168)
    at net.sf.samtools.SAMTextReader.access$500(SAMTextReader.java:40)
    at net.sf.samtools.SAMTextReader$RecordIterator.parseLine(SAMTextReader.java:316)
    at net.sf.samtools.SAMTextReader$RecordIterator.<init>(SAMTextReader.java:202)
    at net.sf.samtools.SAMTextReader$RecordIterator.<init>(SAMTextReader.java:188)
    at net.sf.samtools.SAMTextReader.getIterator(SAMTextReader.java:124)
    at net.sf.samtools.SAMFileReader.iterator(SAMFileReader.java:197)
    at net.sf.samtools.SAMFileReader.iterator(SAMFileReader.java:39)
    at net.sf.samtools.example.ExampleSamUsage.convertReadNamesToUpperCase(ExampleSamUsage.java:54)
    at net.sf.samtools.example.ExampleSamUsage.main(ExampleSamUsage.java:93)
    Java Result: 1
    Dose picard is well tested to use now?

    Leave a comment:


  • nilshomer
    replied
    Originally posted by tgolubch View Post
    Is there a way to install BFAST without root access? I don't want it going into /usr/bin (and don't have access to it on the work server in any case).
    Technically you can't install it to /usr/bin without root access. I assume you have a typically Unix system and you use BASH.

    A useful trick to "fake" an install is to make your own "bin" directory and add the "bin" directory to your path. If your "bin" is found at "$HOME/bin", add this line to your "$HOME/.bash_profile" (assuming bash):
    Code:
    PATH=$PATH:/home/<username>/bin
    Now you can put everyting in "$HOME/bin".

    You can install BFAST in "$HOME/bin" by using the "prefix" option in the "configure" script:
    Code:
    ./configure --prefix=$HOME
    (This is not a typo, --prefix=$HOME/bin would install it in $HOME/bin/bin).
    Now run:
    Code:
    make
    make install
    and everything should be installed into $HOME/bin.

    Nils

    Leave a comment:


  • tgolubch
    replied
    Is there a way to install BFAST without root access? I don't want it going into /usr/bin (and don't have access to it on the work server in any case).

    Leave a comment:

Latest Articles

Collapse

  • SEQadmin2
    Nine Things a Sample Prep Scientist Thinks About Before Sequencing
    by SEQadmin2


    I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.


    Here are nine questions we think about, in roughly the order they matter, before...
    06-18-2026, 07:11 AM
  • SEQadmin2
    From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
    by SEQadmin2


    Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


    The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
    ...
    06-02-2026, 10:05 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by SEQadmin2, 06-17-2026, 06:09 AM
0 responses
30 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 06-09-2026, 11:58 AM
0 responses
44 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 06-05-2026, 10:09 AM
0 responses
51 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 06-04-2026, 08:59 AM
0 responses
51 views
0 reactions
Last Post SEQadmin2  
Working...