SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to convert a SNP.txt to a bed file or get a SNP.bed from samtools? Ling Bioinformatics 7 04-02-2015 07:17 AM
Updated How to convert .txt file to .bed .GFF or .BAR file format, forevermark4 Bioinformatics 2 06-30-2014 06:02 AM
TopHat file.bam file.bed join Trudy Bioinformatics 1 05-21-2013 12:59 PM
Is there a BED file format validator? Does a BED file have to be sorted position? LauraSmith Bioinformatics 3 05-21-2013 12:54 PM
Converting Dindel VCF file to GATK BED file MolecularToast Bioinformatics 2 09-24-2011 07:38 PM

Reply
 
Thread Tools
Old 01-25-2011, 02:59 AM   #1
m_elena_bioinfo
Member
 
Location: Ospedali Riuniti di Bergamo, ITALY

Join Date: Oct 2009
Posts: 99
Default bed file for each read

Good morning SEQanswer community,
I have to create a bed file containing one read for lane and relative coverage, like this:

chr2 1 100 1
chr2 2 101 1
chr2 3 102 1
...
Someone can help me?!?
Thanks a lot!
ME
m_elena_bioinfo is offline   Reply With Quote
Old 01-25-2011, 08:50 AM   #2
dariober
Senior Member
 
Location: Cambridge, UK

Join Date: May 2010
Posts: 311
Default

Hello,

It's bit vague what you want to achieve... See if this points you in the right direction...

If you have a SAM file you can convert it to BED (one read per line) with samtools and bedtools like this:
Code:
## Convert SAM file myaln.sam to BAM:
samtools view -b -S -o myaln.bam myaln.sam

## Convert BAM to BED:
bamToBed -i myaln.bam > myaln.bed
If you want to count how many reads map on each gene or transcript of a GTF file:
Code:
## Coverage of GTF features (for each gene/transcript, how many reads overlap it?):
coverageBed -abam myaln.bam -b myspecies.gtf > myaln.cov
See also samtools pileup to have the read count at each genome position (not sure if this is what you mean).

Good luck!
Dario
dariober is offline   Reply With Quote
Old 01-25-2011, 08:52 AM   #3
m_elena_bioinfo
Member
 
Location: Ospedali Riuniti di Bergamo, ITALY

Join Date: Oct 2009
Posts: 99
Default

Thank you very much Dario, it works fine!!!
It's perfect!!
m_elena_bioinfo is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 12:11 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO