How to do variant calling on .sam and .bam files using 'bio-samtools'?
3
0
Entering edit mode
8.9 years ago
elvissober ▴ 20

How to do variant calling on .sam files using 'bio-samtools'?

I have the code:

#!/usr/bin/ruby

require 'bio-samtools'

bam = Bio::DB::Sam.new(:bam=>"my_sorted.bam", :fasta=>'ref.fasta')
  bam.open

What methods to call on bam object or what next steps to do? Thank you.

wgs sequencing sequence software-error • 2.2k views
ADD COMMENT
0
Entering edit mode

why not using a simple shell script ?

ADD REPLY
0
Entering edit mode

Need all in one Ruby workflow, thank you for you replies

ADD REPLY
0
Entering edit mode
8.9 years ago

Have you read the github page?

ADD COMMENT
0
Entering edit mode
8.9 years ago

Looks like you'll want to call mpileup with the :g option. Documentation and code are here:

https://github.com/helios/bioruby-samtools/blob/fe97402bf150877f0d84587abc82fab35d66297c/lib/bio/db/sam.rb#L186

ADD COMMENT
0
Entering edit mode
2.3 years ago
kojix2 ▴ 250

I've created ruby-htslib to make this sort of thing possible. It's not as well tested as the fine libraries in Python and other languages, so there may be some bugs left, but if you find a bug, I'll fix it.

https://github.com/kojix2/ruby-htslib

ADD COMMENT

Login before adding your answer.

Traffic: 1986 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6