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.)
Unconfigured Ad
Collapse
X
-
@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:
-
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:
-
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:
-
Could you post your example (with a download link) to [email protected] so I can take a look?Originally posted by tgolubch View PostThanks, Nils; I had already tried changing the prefix, but it still seems to fail -- I'll look into it again when I have time.
Nils
Leave a comment:
-
You could just run "samtools view in.bam | grep chr22" for example. Weird that your merge fails.Originally posted by Jeckow View PostHi 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.
Nils
Leave a comment:
-
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:
-
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:
-
Yes, I used bwa-0.5.0, bwa-0.5.2 have no such bugs at all.Originally posted by lh3 View PostPicard 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.
Excellent wrok!!!
Leave a comment:
-
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).Originally posted by Jeckow View PostHi,
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:
-
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:
-
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:
-
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:
-
Technically you can't install it to /usr/bin without root access. I assume you have a typically Unix system and you use BASH.Originally posted by tgolubch View PostIs 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).
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):
Now you can put everyting in "$HOME/bin".Code:PATH=$PATH:/home/<username>/bin
You can install BFAST in "$HOME/bin" by using the "prefix" option in the "configure" script:
(This is not a typo, --prefix=$HOME/bin would install it in $HOME/bin/bin).Code:./configure --prefix=$HOME
Now run:
and everything should be installed into $HOME/bin.Code:make make install
Nils
Leave a comment:
-
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
-
by SEQadmin2
Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?
Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating...-
Channel: Articles
10-14-2026, 09:55 AM -
-
by SEQadmin2
Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.
We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing...-
Channel: Articles
-
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, 10-22-2026, 11:13 AM
|
0 responses
28 views
0 reactions
|
Last Post
by SEQadmin2
10-22-2026, 11:13 AM
|
||
|
Started by SEQadmin2, 10-22-2026, 10:48 AM
|
0 responses
20 views
0 reactions
|
Last Post
by SEQadmin2
10-22-2026, 10:48 AM
|
||
|
Started by SEQadmin2, 10-15-2026, 10:52 AM
|
0 responses
38 views
0 reactions
|
Last Post
by SEQadmin2
10-15-2026, 10:52 AM
|
||
|
Started by SEQadmin2, 10-14-2026, 05:39 AM
|
0 responses
44 views
0 reactions
|
Last Post
by SEQadmin2
10-14-2026, 05:39 AM
|
Leave a comment: