sivarajankumar / fluxcapacitor

Automatically exported from code.google.com/p/fluxcapacitor
0 stars 0 forks source link

Sorting GTF file causes NullPointerException #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For which program(s) you want a new feature?
Simulator

Which build of the program(s)?
1.0-RC1

What operating system you use?
unix64

What steps will reproduce the problem?
1. We create a GTF file by ourselves based on mutations we produced on a 
reference genome (substitutions, indels, translocations).
The GTF file is not sorted (what kind of sort should be applied?).
The sort was performed flawlessly by previous versions of FluxSimulator. We 
assumed that our GTF had the necessary informations :)
In attachment, you have the 10 first lines of the GTF file (I could send the 
complete compressed file, if necessary).
2. FluxSimulator is launched using the following parameters:
flux -t simulator --log DEBUG -p GRCh37/sim.200bp.pe.1.0.par
3. This is FluxSimulator output:
[INFO] I am the Flux Simulator ( Devel Mode ), nice to meet you!

[INFO] No mode selected, executing the full pipeline (-x -l -s)
[INFO] I am collecting information on the run.
        Reading error model  

[INFO] Checking GTF file
        checking *[WARN] Unsorted in line 8 transcript id ENST00000381602 used twice, on: chr10,chr10
[GTF FILE] The GTF reference file given is not sorted, sorting it right now...
        sorting GTF file java.util.concurrent.ExecutionException: java.lang.NullPointerException
        at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
        at java.util.concurrent.FutureTask.get(FutureTask.java:111)
        at fbi.commons.tools.UnixStreamSorter.divide(UnixStreamSorter.java:295)
        at fbi.commons.tools.UnixStreamSorter.sort(UnixStreamSorter.java:123)
        at fbi.commons.tools.Sorter$1.call(Sorter.java:193)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.NullPointerException
        at fbi.genome.io.gff.GFFSorter.encode(GFFSorter.java:76)
        at fbi.genome.io.gff.GFFSorter$GlobalTranscriptPositionComparator.compare(GFFSorter.java:344)
        at fbi.genome.io.gff.GFFSorter$GlobalTranscriptPositionComparator.compare(GFFSorter.java:321)
        at fbi.commons.tools.LineComparator.compare(LineComparator.java:222)
        at fbi.commons.tools.LineComparator.compare(LineComparator.java:21)
        at fbi.commons.tools.LineComparator.compare(LineComparator.java:229)
        at fbi.commons.tools.LineComparator.compare(LineComparator.java:21)
        at java.util.Arrays.mergeSort(Arrays.java:1283)
        at java.util.Arrays.mergeSort(Arrays.java:1294)
        at java.util.Arrays.mergeSort(Arrays.java:1295)
        at java.util.Arrays.mergeSort(Arrays.java:1295)
        at java.util.Arrays.mergeSort(Arrays.java:1295)
        at java.util.Arrays.mergeSort(Arrays.java:1295)
        at java.util.Arrays.mergeSort(Arrays.java:1295)
        at java.util.Arrays.mergeSort(Arrays.java:1294)
        at java.util.Arrays.mergeSort(Arrays.java:1295)
        at java.util.Arrays.mergeSort(Arrays.java:1294)
        at java.util.Arrays.mergeSort(Arrays.java:1294)
        at java.util.Arrays.mergeSort(Arrays.java:1294)
        at java.util.Arrays.sort(Arrays.java:1223)
        at java.util.Collections.sort(Collections.java:176)
        at fbi.commons.tools.UnixStreamSorter.sortAndWriteTempFile(UnixStreamSorter.java:358)
        at fbi.commons.tools.UnixStreamSorter.access$200(UnixStreamSorter.java:33)
        at fbi.commons.tools.UnixStreamSorter$2.call(UnixStreamSorter.java:275)
        at fbi.commons.tools.UnixStreamSorter$2.call(UnixStreamSorter.java:272)
        ... 5 more

and this is repeated many many times.

Original issue reported on code.google.com by mikael.s...@gmail.com on 4 Jul 2011 at 10:04

Attachments:

GoogleCodeExporter commented 8 years ago
I am going to take a look

Original comment by thasso.g...@gmail.com on 4 Jul 2011 at 10:18

GoogleCodeExporter commented 8 years ago
I just tried to reproduce the error but unfortunately I can sort the attached 
"buggy.gtf" without any problems.

It would be great if you could attach a compressed full gtf so I can reproduce 
the error and fix it. 

Thanks

Original comment by thasso.g...@gmail.com on 4 Jul 2011 at 11:58

GoogleCodeExporter commented 8 years ago
I was able to reproduce the error by introducing empty lines at the end of the 
file. This issues is fixed and the fix will be incorporated in the next 
release. 

It would still be great if you could attach the full gtf so that I can verify 
that this was the reason for the error.

In the meantime, and if this was the actual problem, you should be able to 
workaround the bug by removing all empty lines in the GTF file, especially at 
the end of the file.

Original comment by thasso.g...@gmail.com on 4 Jul 2011 at 12:07

GoogleCodeExporter commented 8 years ago
Unfortunately, there is no empty line in the original file. So I attach the 
(compressed) original file.

Thanks!

Original comment by mikael.s...@gmail.com on 4 Jul 2011 at 12:23

Attachments:

GoogleCodeExporter commented 8 years ago
Found it. Thanks for the attachment. It was a threading issue in the sorter. 
Its fixed and will be incorporated in the next release. To workaround, you can 
try to set the number of threads to 1 (--threads 1).

Original comment by thasso.g...@gmail.com on 4 Jul 2011 at 4:13