Closed GBeattie closed 4 years ago
Thanks for the question. If you want to pipe in a SAM, you should use
samtools sort -n | samtools view -h | Genrich -t -
Hi,
I am facing the same error:
samtools sort -n S.sam | samtools view -h - | Genrich -t - -o S.site
[bam_sort_core] merging from 66 files...
Error! m54294U_200627_102135/723/0_112904_rep0_sub0: poorly formatted SAM/BAM record
Hey!
I was getting an error when inputing non-name sorted BAM files, so I prepended with a
samtools sort -n
pipe, followed by a zcat pipe (as requested by Genrich) which resulted in a broken pipe. Also tried getting around this withsamtools sort -n -l 0
, but that gave the same error.My current attempt is:
Output:
I will add that the command runs to completion with the starting BAM file using the -S flag, although my understanding is that this isn't ideal.
Genrich -t 1-aCT-CD8-neg_S12_L001.sorted.bam -o test.narrowPeak -j -y -r -S -e chrM -v
Is there an alternate approach that would allow for the input to be name sorted, preferably in a single piped command?