Closed jctourtellotte closed 11 months ago
pairtools sort is designed to sort pair files, not sam... If I am not completely missing the point somehow (also, I think your input and output arguments are swapped, i.e. -o should point to pairs.gz, not .bam)
pairtools sort is designed to sort pair files, not sam... If I am not completely missing the point somehow (also, I think your input and output arguments are swapped, i.e. -o should point to pairs.gz, not .bam)
pairtools sort --nproc 5 -o test.sorted.pairs.gz test.pairs.gz
(from the docs)
I do not have the input and output swapped, see code example above from the docs, output is before input–which generally feels counter inituive to me but has been the case for a few scripts. What I DO have, and thank you for pointing it out, is a ".bam" that should be a ".gz". I do not know how I did not catch that! Thank you @Phlya Hopefully, fixing that fixes the issue.
OK I just assumed you wanted to sort a bam file and output pairs, hence I thought you swapped the paths. Hope this solved the problem, feel free to reopen if you have more issues with this.
FYI if you don't provide the -o argument pairtools will simply output to stdout, so you can redirect it to any tool or file of choice, and then have the output after input.
I am encountering a header error when trying to run
pairtools sort.
[main_samview] fail to read the header from "-".
This is the contents of the shell script I am sending as a job to a cluster:
My header contents are as follows, via samtools:
I built the chromsizes file using faidx. The python environment activated was setup specifically for using pairtools.
Where am I going wrong? It feels like it might be quite obvious, but perhaps not.