SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   How to check read are properly paired from SAM file? (http://seqanswers.com/forums/showthread.php?t=5697)

jlfmssm 06-25-2010 04:07 PM

How to check read are properly paired from SAM file?
 
I am new for NGS data.
How to check reads are properly paired from SAM file?
It is appreciated someone can point me some programs?

Thanks,
Aimin

nilshomer 06-25-2010 04:15 PM

Quote:

Originally Posted by jlfmssm (Post 20854)
I am new for NGS data.
How to check reads are properly paired from SAM file?
It is appreciated someone can point me some programs?

Thanks,
Aimin

Use 'samtools view -X <in.bam>'. All reads with a capital "P" in the flag field are properly paired.

jlfmssm 06-25-2010 05:41 PM

Thanks, I tried, but I got this error:

[aimin@node01 all_sam_data]$ samtools view -X 1382_1.sam/1382_1.sam
[bam_header_read] EOF marker is absent.
[main_samview] fail to read the header.

nilshomer 06-25-2010 06:00 PM

Quote:

Originally Posted by jlfmssm (Post 20857)
Thanks, I tried, but I got this error:

[aimin@node01 all_sam_data]$ samtools view -X 1382_1.sam/1382_1.sam
[bam_header_read] EOF marker is absent.
[main_samview] fail to read the header.

Use the "-S" flag to specify that you are inputting a SAM file (not a BAM file). Please read the documentation, including the output when no options/input is specified.

jlfmssm 06-25-2010 08:13 PM

but I got this:
[aimin@node01 all_sam_data]$ samtools view -S -X 1382_1.sam/1382_1.sam -o 1382_1_test.out
[samopen] no @SQ lines in the header.
[sam_read1] missing header? Abort!
What I should do now?

nilshomer 06-25-2010 11:23 PM

Quote:

Originally Posted by jlfmssm (Post 20859)
but I got this:
[aimin@node01 all_sam_data]$ samtools view -S -X 1382_1.sam/1382_1.sam -o 1382_1_test.out
[samopen] no @SQ lines in the header.
[sam_read1] missing header? Abort!
What I should do now?

The lines "no @SQ lines in the header" and "missing header?" should tell you to check the header in the SAM file. Is there one? If not, you have to feed in your reference with the "-T" option.


All times are GMT -8. The time now is 11:07 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.