Hi guys im new in SAMtools.
I want to extract some info from the .bam file and put them into a new .txt file.
e.g. a portion of the .bam file is like:
read1 0 chr1 1 37 39M * 0 0 GAACTGGATACAGACATGGCCTTAAGGTTGGGAGGTAAT
read9 0 chr1 20 37 19M1D5M * 0 0 GAACTGGATACAGACATGGCTTGA
so what if I only want to extract certain fields as the following format:
chr1 1 GAACTGGATACAGACATGGCCTTAAGGTTGGGAGGTAAT
chr1 20 GAACTGGATACAGACATGGCTTGA
(fields 3, 4, 10)
are there any methods can do such thing?
any suggestions? thx!
I want to extract some info from the .bam file and put them into a new .txt file.
e.g. a portion of the .bam file is like:
read1 0 chr1 1 37 39M * 0 0 GAACTGGATACAGACATGGCCTTAAGGTTGGGAGGTAAT
read9 0 chr1 20 37 19M1D5M * 0 0 GAACTGGATACAGACATGGCTTGA
so what if I only want to extract certain fields as the following format:
chr1 1 GAACTGGATACAGACATGGCCTTAAGGTTGGGAGGTAAT
chr1 20 GAACTGGATACAGACATGGCTTGA
(fields 3, 4, 10)
are there any methods can do such thing?
any suggestions? thx!
Comment