Start with your initial sam with its intact header. Make the header its own file with
Code:
samtools view -H original.sam > header.txt
You are currently viewing the SEQanswers forums as a guest, which limits your access. Click here to register now, and join the discussion
samtools view -H original.sam > header.txt
awk '($9>=74 || $9 <=-74) {print}' ctrl-new.sam > noovctrl.sam
samtools view -bhS noovctrl.sam > ctrl-new.bam
samtools view ctrl-new.bam | head
[bam_header_read] bgzf_check_EOF: Invalid argument [bam_header_read] invalid BAM binary header (this is not a BAM file). [main_samview] fail to read the header from "ctrl-new.bam"
magic_len = bam_read(fp, buf, 4); if (magic_len != 4 || strncmp(buf, "BAM\001", 4) != 0) { fprintf(stderr, "[bam_header_read] invalid BAM binary header (this is not a BAM file).\n"); return 0; }
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, 07-25-2024, 06:46 AM
|
0 responses
9 views
0 likes
|
Last Post
by seqadmin
07-25-2024, 06:46 AM
|
||
Started by seqadmin, 07-24-2024, 11:09 AM
|
0 responses
26 views
0 likes
|
Last Post
by seqadmin
07-24-2024, 11:09 AM
|
||
Started by seqadmin, 07-19-2024, 07:20 AM
|
0 responses
160 views
0 likes
|
Last Post
by seqadmin
07-19-2024, 07:20 AM
|
||
Started by seqadmin, 07-16-2024, 05:49 AM
|
0 responses
127 views
0 likes
|
Last Post
by seqadmin
07-16-2024, 05:49 AM
|
Leave a comment: