weng-lab/TEMP2

/usr/bin/cat: Argument list too long

Closed this issue · 1 comments

Dear TEMP2 authors,

I have been recently getting this bug from running TEMP2

TEMP2_insertion.sh: ligne292: /usr/bin/cat: Argument list too long
TEMP2_insertion.sh: ligne294: /usr/bin/cat: Argument list too long
TEMP2_insertion.sh: ligne296: /usr/bin/cat: Argument list too long

It turns out that I have too many file in the folder "${PREFIX}.transposonMapping/" and that "cat" cannot read all of those files.
Here is an example on how I solve the issue at line 292, but I feel that a proper fix of this problem should be provided.

rm ${PREFIX}.unsorted.tmp
for f in ${PREFIX}.transposonMapping/*.sense.bdg; do cat $f >> ${PREFIX}.unsorted.tmp ; done
sort -k1,1 -k2,2n ${PREFIX}.unsorted.tmp > ${PREFIX}.tmp && ${BINDIR}/mergeOverlappedBdg ${PREFIX}.tmp > ${PREFIX}.transposon.sense.bdg

Cheers,
Josquin

Hi Josquin, thanks for your suggestion! I should have noticed the transposon list is quite long for some species, which "cat" cannot handle. I've updated TEMP2 and this issue is now solved.