Thanks, very helpful.
• 1 views
•
link
Hi all,
Does anybody know if there is a restriction for a read name length (say up to 10k characters)? Have you ever experienced that any software (like samtools, bwa, STAR, etc) complains about long read names?
Thanks
in htslib / sam.h https://github.com/samtools/htslib/blob/develop/htslib/sam.h
the read name is coded by
/* @field l_qname length of the query name */
uint8_t l_qname;
which is an unsigned byte. So the read name shouldn't be longer than 2^8=256.
it's even shorter in the read-sam method:
https://github.com/samtools/htslib/blob/f2150106bafda80ccd97970637091bb2799bc426/sam.c#L1305
_parse_err(p - q > 252, "query name too long");
Thanks, very helpful.
Log in to answer this question.
Please define long. 100 characters, 10000 characters?
See the edited version.
what's your motivation for doing this ?
I am writing a pipeline, where there is a read simulation step, and I want to include some information in the read name, like chr name (which can be long in some cases), coordinates, strand etc.