I have the following list:
l={"1 atattaggtt tttacctacc caggaaaagc caaccaacct
61 ctctaaacga actttaaaat ctgtgtagct gtcgctcggc
121 gcagtataaa caataataaa"}
which I want to turn into:
{{{1,{"atattaggtt","tttacctacc","caggaaaagc","caaccaacct"}},
{61,{"ctctaaacga","actttaaaat","ctgtgtagct","gtcgctcggc"}},
{121,{"gcagtataaa","caataataaa"}}}
I wonder how one does this?
Update: I know that StringReplace[l, WhitespaceCharacter -> ","]
gives me:
{"1,atattaggtt,tttacctacc,caggaaaagc,caaccaacct,61,ctctaaacga,\
actttaaaat,ctgtgtagct,gtcgctcggc,121,gcagtataaa,caataataaa"}
Yet I don't know how to sublist this as above.
StringSplit[lis, ","]
$\endgroup$StringSplit[]
$\endgroup$Yet I don't know how to sublist this as above.
not to the main question. $\endgroup$