SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bam file to Consensus Fasta/fastq in python daniel_navarro Bioinformatics 1 05-17-2014 10:59 AM
Generate consensus from MultiFasta Antony03 Bioinformatics 2 11-13-2013 06:43 PM
ORF from Multifasta File mhadidi2002 Bioinformatics 1 03-07-2012 09:05 AM
TopHat - Cufflinks problems in a multifasta file ccstaats Bioinformatics 2 01-31-2012 09:51 AM
Problem mapping to multifasta reference file Mamoon Rashid Bioinformatics 0 05-14-2011 08:19 AM

Reply
 
Thread Tools
Old 09-04-2014, 07:32 AM   #1
huma Asif
Member
 
Location: Japan

Join Date: Oct 2010
Posts: 53
Default consensus fasta and multifasta file of human genomes

Dear All,
i desperately need help in converting a thought to work.

i have sequence six human samples and have created six alignment file (BAM) using UCSC reference.
i need to do multiple alignment of all these samples how can i do that

how i can convert every bam to consensus fasta
how i can merge six consensus fasta into multifasta
any software or reference will be appreciated

Last edited by huma Asif; 09-08-2014 at 05:22 PM.
huma Asif is offline   Reply With Quote
Old 09-04-2014, 07:52 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,046
Default

From Samtools manual page:

Quote:
Generate the consensus sequence for one diploid individual:

samtools mpileup -uf ref.fa aln.bam | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fq
Use seqtk to convert from fastq to fasta.

Concatenate (end to end, you are not "merging" the files this way) the fasta files with "cat" to generate multifasta.

If you truly want to do whole genome alignments: http://genomewiki.ucsc.edu/index.php...lignment_howto
GenoMax is offline   Reply With Quote
Old 09-04-2014, 07:57 AM   #3
huma Asif
Member
 
Location: Japan

Join Date: Oct 2010
Posts: 53
Default

thank you so much will try now
huma Asif is offline   Reply With Quote
Old 09-04-2014, 12:09 PM   #4
huma Asif
Member
 
Location: Japan

Join Date: Oct 2010
Posts: 53
Default

well i am done with first step but look at my fastq file with many NNNNNNNNNN
is this because my data is targeted exome sequencing
how can i get rid of it
if i use this fastq in seqtk it gives me empty output
huma Asif is offline   Reply With Quote
Old 09-04-2014, 01:31 PM   #5
vivek_
PhD Student
 
Location: Denmark

Join Date: Jul 2012
Posts: 164
Default

If your data is exome sequencing use the -L option in samtools and specify your capture regions file in the mpileup step.
vivek_ is offline   Reply With Quote
Old 09-05-2014, 06:14 AM   #6
huma Asif
Member
 
Location: Japan

Join Date: Oct 2010
Posts: 53
Default

give the same result with -L

see my code
samtools mpileup -uf human_hg19.fa reads.bam -L targetSeq_exome_target_regions_hg19.bed |bcftools view -cg - |/usr/local/genome/samtools-0.1.18/bcftools/vcfutils.pl vcf2fq > cns.fastq



fq with many n and empty fasta with
seqtk seq ľa cns.fastq > cns.fa
huma Asif is offline   Reply With Quote
Old 09-05-2014, 07:19 AM   #7
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,046
Default

That should have been a lower case "l".
Quote:
-l FILE list of positions (chr pos) or regions (BED) [null]
-L means something else for samtools mpileup.
GenoMax is offline   Reply With Quote
Old 09-05-2014, 07:25 AM   #8
huma Asif
Member
 
Location: Japan

Join Date: Oct 2010
Posts: 53
Default

thank you so much i am going to try this now
huma Asif is offline   Reply With Quote
Old 09-05-2014, 09:03 AM   #9
huma Asif
Member
 
Location: Japan

Join Date: Oct 2010
Posts: 53
Default

tried with small l still n in final output please suggest where i can get wrong

see my code
samtools mpileup -uf human_hg19.fa reads.bam -l targetSeq_exome_target_regions_hg19.bed |bcftools view -cg - |/usr/local/genome/samtools-0.1.18/bcftools/vcfutils.pl vcf2fq > cns.fastq
huma Asif is offline   Reply With Quote
Reply

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 05:18 PM.


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