Skip to content

BAM header insertion problem #14

@micdic

Description

@micdic

Dear all,
I'm trying to insert a BAM file on the chain, but when the process (insertData.py) reaches the header data structure (aftec correctly inserted the chrs), it creates one big string inside the JSON structure, and the process ends with this error:

File "insertData.py", line 295, in
main()
File "insertData.py", line 267, in main
insertHeader(args.chainName, args.multichainLoc, data, args.datadir)
File "insertData.py", line 127, in insertHeader
publishToStream(chainName, datadir, "metaData", ("header",), multichainLoc, headerData)
...
raise child_exception
OSError: [Errno 7] Argument list too long

If i extract the header of the used BAM file with samtools, i got :

@hd VN:1.4 SO:coordinate
@sq SN:chr1 LN:248956422
@sq SN:chr2 LN:242193529
@sq SN:chr3 LN:198295559
@sq SN:chr4 LN:190214555
@sq SN:chr5 LN:181538259
. . . .

If i print the header structure that SAMchain creates in the insertData.py, function insertHeader() {..}, i got this:
{"json":{"header":"['@hd\tVN:1.4\tSO:coordinate\n', '@sq\tSN:chr1\tLN:248956422\n', '@sq\tSN:chr2\tLN:242193529\n', '@sq\tSN:chr3\tLN:198295559\n', '@sq\tSN:chr4\tLN:190214555\n', '@sq\tSN:chr5\tLN:181538259\n', . . . .

A huge string that i presume has also some escape char problems.

Do i miss something?, or may be it's a special header format not supported, or do i need to pre-process the header in this case?
I'm using multichain2-3-3 version.

Any helps?
Thanks in advance,
Michele

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions