what should be view inside of SAM file?
1
0
Entering edit mode
3.9 years ago
modarzi ▴ 170

Dear all, I need to generate SAM file through BWA. So, I run the below command for viewing inside of that:

Zcat SRR1426578.sam.gz | head

and I see the below result:

@SQ    SN:chr1    LN:248956422
@SQ    SN:chr10    LN:133797422
@SQ    SN:chr11    LN:135086622
@SQ    SN:chr11_KI270721v1_random    LN:100316
@SQ    SN:chr12    LN:133275309
@SQ    SN:chr13    LN:114364328
@SQ    SN:chr14    LN:107043718
@SQ    SN:chr14_GL000009v2_random    LN:201709
@SQ    SN:chr14_GL000225v1_random    LN:211173
@SQ    SN:chr14_KI270722v1_random    LN:194050

my question is that is that content for my command is normal?In other words, my result from bwa is correct?

I appreciate it if anybody shares his/her comment with me?

SAM BWA • 1.8k views
ADD COMMENT
2
Entering edit mode

The first 10 lines of the header look fine. Why do you suspect the output from BWA? Did the job get killed halfway through or something?

ADD REPLY
0
Entering edit mode

Dear @Antonio R. Franco and @_r_am.Thank you for your comments. I suspected to my generated SAM file because:

1- I use zcat for another SAM file and see below result for the first line of the header:

@SQ    SN:chr1    LN:10000000
GFGG-GA2-1:2:33:2000:3530    99    chr1    2128983    60    100M    =    2129233    350    CTGACTGATCAAAGCTGAAATCCTTATCTTGTCTCTCAGACTGATTGTGGTGAGAATCTCTGTCTTGTCTCTCAGGCTGACTGTGGTGGGAATCTCTGTC    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!N
M:i:1    AS:i:95    XS:i:19

2- I generated a SAM file through bwa as input for the CIRI2 tool to finding CircularRNA. My pipeline is based on CIRI2 but I couldn't find any CircularRNA in SAM files! So, I thought that my problem is in generated SAM files.

Could you please share your comment with me?

Best Regards,

ADD REPLY
1
Entering edit mode

If a tool disegned to find circular DNA does not find any circular DNA in a SAM/BAM file, I doubt very much about the convenience of anybody looking into with their naked eyes into the mapping information found in this file

ADD REPLY
0
Entering edit mode

That SAM file seems to have just one line in its header. Please read the SAM specification - a simple head can't tell you much about a SAM file.

ADD REPLY
4
Entering edit mode
3.9 years ago

Don't use zcat on BAM/SAM files. It is much more advisable to use samtools view since you are dealing with huge files and samtools is designed for this end and provide extra functionality

For example. samtools view -H will let you see the header, but most of the time you want to see the mapped data, or even filter for the flag column, etc. For example samtools view -b -f 2 your.bam > new.bam will filter your mapped data with concordant or proper pairs (if using paired end reads) and will write you a new bam file with those. Take a look to THIS THREAD to see some examples

In addition. Look for some tutorials, and take a look to the help provided by running samtools or samtools view, etc . By running samtools you will se how much information you can get from your BAM files (statistics, etc)

The information contained within a BAM/SAM file is huge. You should read the SAM file specification file found at https://samtools.github.io/hts-specs/SAMv1.pdf

ADD COMMENT
0
Entering edit mode

Agreed. No one compresses sam file like that, use something that will compress it to a .bam file instead, and use samtools view to examine the file.

ADD REPLY

Login before adding your answer.

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