PDF name size should be controlled
tdelhomme opened this issue · comments
At the moment, we write a PDF for each variant with a name corresponding to the mutation, e.g:
chr16_1817831_1818240_T_A.pdf
for a T to A at this particular position.
There is a bug when the mutation is a long indel, i.e. when the PDF name contains more than 255 character: R does not accept such a long name.
To solve this, we can take only the beginning of the indel (10bp
for example) in the PDF name, and add a flag to know that it is truncated.
@mfoll what do you think about the name we would choose?
something like chr16_1817831_1818240_T_TATGCGCCTA*.pdf
or like chr16_1817831_1818240_T_INS154.pdf
for an insertion of 145bp?
I don't like the asterisk in a filename, it can be confusing. I like the second option but would prefer chr16_1817831_1818240_T_INS145.pdf for an insertion of 145bp 😇
😈
@mfoll finally Ive chosen the format chr16_1817831_1818240_T_TCGCTxGCTCG.pdf
, it is more convenient in term of coding: because we use prev_bp
in ALT, we would need to test if we are in the case of long indel and have a particular PDF name in this case. Here I just modify the ALT if too long, and do not change any other piece of code.
Is this ok for you?