View Single Post
Old 01-16-2012, 08:17 AM   #7
Jane M
Senior Member
 
Location: Paris

Join Date: Aug 2011
Posts: 239
Default

Ok, so I made some progress! I changed the --refseq into -R option and I changed my s_garma-fibros_converted.bam file into s_garma-fibros_converted_sorted.bam file which is the sorted bam file.
Now, I have a new error:

Quote:
##### ERROR MESSAGE: SAM/BAM file ../../../../data/patient1/s_garma-fibros_converted_sorted.bam is malformed: SAM file doesn't have any read groups defined in the header. The GATK no longer supports SAM files without read groups
I got the BAM file this way:
Quote:
samtools view -b -S -t /home/m/hg19.fa s_garma-fibros_converted.sam > s_garma-fibros_converted.bam
samtools sort s_garma-fibros_converted.bam s_garma-fibros_converted_sorted
samtools index s_garma-fibros_converted_sorted.bam
Here http://www.broadinstitute.org/gsa/wi...s_for_the_GATK, I read that:
The file must be binary (.bam).
The file must be indexed.
The file must be sorted in coordinate order with respect to the reference (i.e. the contig ordering in your bam must exactly match that of the reference you are using).
The file must have a proper bam header with read groups. Each read group must contain the platform (PL) and sample (SM) tags. For the platform value, we currently support 454, LS454, Illumina, Solid, ABI_Solid, and CG (all case-insensitive).
Each read in the file must be associated with exactly one read group.

The first 2 steps are ok. For the index, I used the default option, it was enough to visualize the files in IGV but I don't know if it is the right index for this use.
And I haven't done the last 2 steps: I don"t know if the file has a proper bam header with read groups and if each read in the file is associated with exactly one read group, because I cannot open a bam file:

Code:
more s_garma-fibros_converted_sorted.bam
\�@��qrF�!���m>(Lj��m�c� 7�,7�cr"�1e��9���1X3�8�
                                                     ��5�PCY�N(ǒ���,6��^L�%D�<CN8ψ�{�/vϘ!,�.�g*��284��yf^L�Xa<s�S

[m@U1009-PCJane patient1]$ more s_garma-fibros_converted.sam
@PG	ID:illumina_export2sam.pl	VN:2.0.0	CL:/usr/local/bin/illumina_export2sam.pl --read1=s_gar
ma-fibros_1_export.txt --read2=s_garma-fibros_2_export.txt
HWI-ST584_81:4:1101:1198:2065	89	chr7	156837088	28	76M	*	0	0	GGCTTG
AACAACGGAAATGTGTCAAATGTGTCAGCTCCCAGCTCAGAGACTGGGAGACCAGGCCGAGGCGCCGGCN	######################################
######################################	BC:Z:AGTCAA	XD:Z:75A	SM:i:28	AS:i:0
HWI-ST584_81:4:1101:1198:2065	165	*	0	0	*	chr7	156837088	0	GGAGCC
CTGCTGCGTAGTNNNNNNNNNNACACGGTGTATTATTACTTTCCCAGGACCACCGTAACAAAGTAGCACA	CCCFFFFFHHHHGJHGIH####################
######################################	BC:Z:AGTCAA
HWI-ST584_81:4:1101:1174:2078	73	chr5	41048452	254	76M	*	0	0	AAACGT
GTTTTCCATAGGTCTACCAATTTTGGGTGAATTATCTCAGGCAGTATCTTCAAAAGCCCTATTGCACCAG	CCCFFFFDHHHHHIIIJJIJJIJJJJJJJJJJJGHGJJ
JIJIJJJJIJJJIIJJJJJJJIIJGIJJJIIIJJHHHA	BC:Z:AGTCAA	XD:Z:76	SM:i:359	AS:i:0
I can only open the SAM file. How can I check if my bam file is correctly formated if I cannot open it?
Jane M is offline   Reply With Quote