SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Read Group info to a set of Bam files wjeck Bioinformatics 42 02-23-2015 05:16 AM
adding RG tags to bam files kapr0007 Introductions 1 02-23-2015 02:44 AM
Bedtools Intersection files bnfoguy Bioinformatics 1 06-17-2014 12:31 AM
Compare Fields in 2 Different Files John.Mar Bioinformatics 3 10-18-2012 10:44 AM
Bedtools and VCF files morangal Bioinformatics 4 07-11-2012 10:55 PM

Reply
 
Thread Tools
Old 12-27-2016, 07:36 AM   #1
toadstools
Junior Member
 
Location: New York

Join Date: Dec 2016
Posts: 1
Default bedtools - adding fields to bedpe files

Bedtools documentation states that one can add two extra fields to a bedpe file when using bamtobed. Does anyone know how to do that? I need to add the read sequences. Thanks.
toadstools is offline   Reply With Quote
Old 01-06-2017, 11:42 AM   #2
dblyons
Junior Member
 
Location: ca

Join Date: Apr 2011
Posts: 5
Default

one possible solution is to use your bed output in conjunction with

bedtools getfasta -tab

then parse the output to get the bed formatting back by perl -wpl -i.bak -e 's/:|-/\t/g;'

if you need the reads themselves and not the genome sequence where they mapped, you could write a sam parser to simply print some of the columns of the sam file. all the info you need is in the sam, just need to look at the sam docs to figure out what you want to print (i.e. which columns) and how to modify the sam to get bed-like coordinates. awk is good for such a task, just be aware of the strand

Last edited by dblyons; 01-06-2017 at 11:56 AM. Reason: typo
dblyons is offline   Reply With Quote
Reply

Tags
bamtobed, bedpe, bedtools, optional fields

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 11:27 AM.


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