Question: Fastq to BAM
0
gravatar for zliew
19 months ago by
zliew0
zliew0 wrote:

I'm new to Galaxy and bioinformatics tool.

I have Fastq data of chicken heavy and light chains and I want to do pca plot on them. I know I have to convert them to BAM file first but I don't know which tool to use - FastqtoSam or Bowtie2. One gave me unaligned BAM and another gave aligned BAM. Then, I used multiBAMsummary tool to see which file was correct but both BAM file gave me an error saying file '0.bam' does not have BAM or CRAM format.

Where did I go wrong?

bam fastq • 4.6k views
ADD COMMENTlink modified 18 months ago by Biostar ♦♦ 20 • written 19 months ago by zliew0

If you want BAM files outputs you can use Rsubread package on R software or use bowtie2 to have SAM format witch you can transform to BAM format with Samtools. They are many tools for this kind of analysis, you can find them in literature. Best regards.

ADD REPLYlink modified 19 months ago by WouterDeCoster45k • written 19 months ago by justinkablan22510

Ok I'll try it. Thank you!

ADD REPLYlink written 19 months ago by zliew0

Did you sort and index your aligned BAM file?

ADD REPLYlink written 19 months ago by GenoMax94k

No, how do I do that?

ADD REPLYlink written 19 months ago by zliew0

A: samtools sorting and indexing

ADD REPLYlink written 19 months ago by manuel.belmadani1.2k

By using samtools sort tool followed by samtools index in Galaxy interface.

ADD REPLYlink modified 19 months ago • written 19 months ago by GenoMax94k

Ok. I'll give it a try. Thank you!

ADD REPLYlink written 19 months ago by zliew0

I want to do pca plot on them

What are you trying to find out?

One gave me unaligned BAM and another gave aligned BAM.

That makes sense. Bowtie2 is an aligner, FastqToSam probably just takes the reads and sticks them in a SAM/BAM format. We can't say which one is right for you without knowing what your goal is. The unaligned one is likely only useful for compatibility with tools expecting a BAM file

Then, I used multiBAMsummary tool to see which file was correct but both BAM file gave me an error saying file '0.bam' does not have BAM or CRAM format

Can you post the exact command you used? What size are your input BAM files?

ADD REPLYlink written 19 months ago by manuel.belmadani1.2k

I have 2 treatment groups - control and probiotic for chicken heavy and light chain. I'm trying to look at the variability of sequences between those treatment group.

I used multiBamsummary under deep Tools. I just noticed the file size says 0 bytes. The run showed up green so I automatically assume that it worked.

ADD REPLYlink written 19 months ago by zliew0
2
gravatar for evelyn
19 months ago by
evelyn130
evelyn130 wrote:

That means it did not run. You can align the fastq files using bowtie2:

bowtie2  -x index -1 R1.fastq -2 R2.fastq -S bowtie.sam

Then convert the sam to bam using samtools:

samtools view -bS bowtie.sam -o bowtie.bam

Then sort it:

samtools sort bowtie.bam -o bowtie.sorted.bam

You can index the .sorted.bam by using:

samtools index bowtie.sorted.bam
ADD COMMENTlink modified 19 months ago • written 19 months ago by evelyn130

I have tried it and it worked! Thank you!

ADD REPLYlink written 19 months ago by zliew0

In short:

bowtie2 (options...) | samtools sort -o bowtie.bam
samtools index bowtie.bam
ADD REPLYlink written 18 months ago by ATpoint44k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1387 users visited in the last hour