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
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...-
Channel: Articles
06-18-2026, 07:11 AM -
-
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.
...-
Channel: Articles
06-02-2026, 10:05 AM -
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Whole-Genome Sequencing Traces Faroe Islands Ancestry to a North Atlantic Founder Population
by SEQadmin2
Started by SEQadmin2, 06-17-2026, 06:09 AM
|
0 responses
30 views
0 reactions
|
Last Post
by SEQadmin2
06-17-2026, 06:09 AM
|
||
|
Sequencing the Two-Toed Sloth Genome Reveals Jumping Genes Tied to Its Extreme Metabolism
by SEQadmin2
Started by SEQadmin2, 06-09-2026, 11:58 AM
|
0 responses
44 views
0 reactions
|
Last Post
by SEQadmin2
06-09-2026, 11:58 AM
|
||
|
Started by SEQadmin2, 06-05-2026, 10:09 AM
|
0 responses
51 views
0 reactions
|
Last Post
by SEQadmin2
06-05-2026, 10:09 AM
|
||
|
Started by SEQadmin2, 06-04-2026, 08:59 AM
|
0 responses
51 views
0 reactions
|
Last Post
by SEQadmin2
06-04-2026, 08:59 AM
|
Leave a comment: