mydatascience / parallel-mpileup

attempt to parallelize mplileup
1 stars 2 forks source link

mpileup file has concatenated lines #1

Open yhoogstrate opened 10 years ago

yhoogstrate commented 10 years ago

When I run the program using 8 threads, I obtain output where lines are concatenated. As you can see, the lines contain two "chr" entries. Some example lines:

chr1 1747536 C 71 >>>>chr10 393090 G 3 ><> IHJ chr10 393103 T 3 ><>chr1 1747537 A 71 >>>><> IHJ> chr10 393113 Achr1 1747538 C 71 >>>><>>>>> 3 >>>><<<><><<<>>> IHJ chr1 1747576 T 71 >>>><>>>>>>>>><<<><<<>><<<<><<<<<>chr10 393181 G 3 ><> IHJ chr1 1747577 C 72 >>>><chr10 393280 A 3 ><> IHJ chr10 393297 A 3 ><>chr1 1747578 C 72 >>>><>> >I>>>H>>J> chr10 393308 T 3 chr1 1747579 T 72 >>>><>>>>>>>>><<<><<<>>><>< <<H<<J< chr10 393321 T 3 ><chr1 1747580 G 72 >>>>> IHJ< chr10 393336 Achr1 1747581 C 72 > 3 ><> IHJ

Does anyone encounter the same problem or has a solution to this?

p.s. I scanned my output with the following command: grep -P "chr[\S]+[\s]+.*?chr" variants.mpileup

yhoogstrate commented 10 years ago

I think it has something to do with the: pthread_mutex_lock(&write_lock); pthread_mutex_unlock(&write_lock); in the function "void * mpileup_kern" in "bam_plcmd.c". There are several of them and the lock gets interrupter for different printing functions. I hope this helps.