Giter VIP home page Giter VIP logo

promi2's People

Contributors

csiu avatar

Watchers

 avatar  avatar

Forkers

bopopescu

promi2's Issues

Value/Unpack error in custom.py caused by tc_quantify

The error:

Argument "" isn't numeric in multiplication (*) at promi2/code/external/tc_quantify/bin/rle_tpm_transform.pl line 48, <MFILE> line 184828.
Argument "" isn't numeric in multiplication (*) at promi2/code/external/tc_quantify/bin/rle_tpm_transform.pl line 48, <MFILE> line 184829.
...

Traceback (most recent call last):
  File "promi2/code/custom.py", line 436, in <module>
    main(args.f_config, args.infile, args.outdir, args.has_mirna, args.make_plots)
  File "promi2/code/custom.py", line 370, in main
    gff_allfeatures = extractFeatures_given_gff(f_config, gff_infile, outdir, has_mirna, is_consider_corr)
  File "promi2/code/custom.py", line 249, in extractFeatures_given_gff
    _, chrom, start, _, stop, strand = re.split('[r:.,]', l[3])
ValueError: need more than 1 value to unpack

Cause:

  • This is strange because there is fewer lines in the tc-infile (184827) then
    what is referred to by the error (e.g. 184828+)
  • these extra lines become 0 in output: *max_tpm.bed
chr5  107718031  107718064  chr5:107718031..107718064,-  .  -  0
0     0          0          0                            0  0
0     0          0          0                            0  0
  • there are 6 columns of 0, program expects 7 columns

make sure directory does not exist for create-training-set.py

Traceback (most recent call last):
  File "create-training-set.py", line 664, in <module>
    main(args.files, args.outdir, args.n , args.l, args.get_id, args.f_config, args.verbose)
  File "create-training-set.py", line 533, in main
    os.path.join(outdir, 'tc-norm_negSet'))
  File "/raid2/local/python2.7.3/lib/python2.7/shutil.py", line 289, in move
    raise Error, "Destination path '%s' already exists" % real_dst
shutil.Error: Destination path '../Test-tset/tc-norm_negSet/tc-norm_negSet' already exists

"ValueError: sample larger than population" when creating the training set

When creating the training set, we seed the background to N*10 positions (default N = 1000).
We then proceed to filter out positions which do not fit our requirements:

  • no repeats
  • no sequences near exon1
  • tc normalization (see tc_normalization.py)/overlap with peak
  • cpg <= 0.5 and cons <= 0.2 and tata <= 0.1
  • mirna_prox = 0

Per chance, the sample of positions left after filtering may be less than N ... causing the following error:

Traceback (most recent call last):
  File "create-training-set.py", line 660, in <module>
    main(args.files, args.outdir, args.n , args.l, args.get_id, args.f_config, args.verbose)
  File "create-training-set.py", line 578, in main
    selectedlines = random.sample(range(1,wc+1), N)
  File "/raid2/local/python2.7.3/lib/python2.7/random.py", line 320, in sample
    raise ValueError("sample larger than population")
ValueError: sample larger than population

Quick and easy thing to do is to rerun the code. Also make sure the tcnorm.ini is updated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.