Fastq to BAM
1
1
Entering edit mode
4.9 years ago
zliew ▴ 10

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 • 17k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

Ok I'll try it. Thank you!

ADD REPLY
0
Entering edit mode

Did you sort and index your aligned BAM file?

ADD REPLY
0
Entering edit mode

No, how do I do that?

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
5
Entering edit mode
4.9 years ago
evelyn ▴ 230

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 COMMENT
1
Entering edit mode

In short:

bowtie2 (options...) | samtools sort -o bowtie.bam
samtools index bowtie.bam
ADD REPLY
0
Entering edit mode

I have tried it and it worked! Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2360 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