This project is read-only.

Cookbook entry suggestion: From fastq to bam

Nov 28, 2014 at 11:18 AM
Say I have a fasta file with genomic scaffolds of species X
Say I have multiple fastq files with illumina reads from that species

Say I want to align those reads to the scaffolds and end up with a BAM or SAM file in the end.

How would I do it in .NET bio 2.0?

(I'm not lazy I'm just struggling) :)
Dec 5, 2014 at 8:34 AM
Hi Fibula,

In all honesty, you want to use off the shelf tools for a task like this. You can do this in about four lines of shell script at the command line using standard tools like Bowtie, BWA-MEM, etc.

Not to say that you couldn't do this in .NET Bio, you could, but the library (at least in my view) is not best used to re-invent functionality that already exists, but for creating new functionality by expanding on and combining older techniques without having to entirely reinvent the wheel every time. So for example, taking that BAM/SAM and doing a new analysis by analyzing the alignments is more easily done without worrying about alignment algorithms, parsers, etc. I personally think of it as a set of ingredients that allows you to cook, rather than a mechanism to imitate other recipes.

So I would definitely go another route. That said, if this is the starting point in your project, or if interested for interests sake (a motivation I often find myself), happy to help more, just wanted to point out the most efficient way first.

Dec 5, 2014 at 11:45 AM
Thanks Nigel
Yes, definitely interested for interests sake. I totally get your point about that there are dedicated tools for this but there are still cases where you may want to do these steps. It is just nice to have snippets of code that go from A to C.
Dec 21, 2014 at 10:50 PM
Edited Dec 21, 2014 at 10:54 PM
Is there a way to view BAM files with this tool? I downloaded some datasets today to look at this none of them can be read here,
Dec 22, 2014 at 6:12 PM
Hi Residentx10!

What do you mean "view" the files? There is a sample command line tool which will dump the output to the console, but .NET Bio is a C# library for building new tools with .NET. It really only includes very basic existing tools based on the standards that are already out there to show how they might be implemented with this library. Are you looking for a GUI tool of some kind?

Aug 22, 2016 at 4:28 AM
I will use the alignment tool to convert the fastq file to a .bam file. And I download some bacterial 16s rrna information with it.