public List<FusionGene> generate(int nFusions, int genesPerFusion) {
        List<FusionGene> list = new ArrayList<FusionGene>();

        //XXX ignoring filters for now..
        List<TranscriptRecord> transcripts = selector.select();
        if(transcripts.size() < genesPerFusion) return list;

        Collections.sort(transcripts, new TranscriptCompare());
        
        Random r = new Random();

        //XXX we only support 2 genes per ReadThrough fusion
        for (int i = 0; i < nFusions; i++) {
            int index = r.nextInt(transcripts.size()-1);
            
            TranscriptRecord gene1 = transcripts.get(index);
            TranscriptRecord gene2 = null;
            
            for(int j = index+1; j < transcripts.size(); j++) {
                TranscriptRecord t = transcripts.get(j);
                if(!gene1.getGeneId().equals(t.getGeneId())) {
                    gene2 = t;
                    break;
                }
            }
            
            if(gene2 == null) {
                for(int j = index-1; j >= 0; j--) {
                    TranscriptRecord t = transcripts.get(j);
                    if(!gene1.getGeneId().equals(t.getGeneId())) {
                        gene2 = gene1;
                        gene2 = t;
                        break;
                    }
                }
            }
            
            list.add(new FusionGene(gene1, gene2));
        }
        
        return list;
    }