metaGmetapop / metapop

A pipeline for the macro- and micro-diversity analyses and visualization of metagenomic-derived populations
MIT License
37 stars 10 forks source link

Error in fixation index step #6

Open susheelbhanu opened 3 years ago

susheelbhanu commented 3 years ago

Hi, Thank you for the tool. I'm trying to run it on a single sample and get the following error. I've posted the full log below:

== Starting run at Wed Feb 10 21:16:26 CET 2021
[1] "Working in: /mnt/lscratch/users/sbusi/metapop"
[1] "Loading MetaPop Modules. This may take a minute."
[1] "Modules loaded."
[1] "Metapop will use the default location for R libraries during this session. This will likely fail in HPC environments."
[1] "Loading Libraries..."
[1] "Loading libraries from: /mnt/lscratch/users/sbusi/tools/miniconda3/envs/metapop/lib/R/library"
[1] "Libraries loaded."
[1] "Beginning MetaPop... "
[1] "Start Preprocessing: 2021-02-10 21:17:01"
[1] "Metapop requires the installation location of samtools so that it may be called. Ignore this if samtools is in the path."
[1] "samtools found in environment. Proceeding"
[1] "Metapop requires the installation location of bcftools so that it may be called. Ignore this is bcftools is in the path."
[1] "bcftools found in environment. Proceeding"
[1] "Newest Samtools"
[1] "Newest BCFtools"
[1] "No genes FASTA file specified. MetaPop will attempt to generate this file"
[1] "Metapop will attempt to generate a genes file using prodigal if it doesn't already exist. This message only appears if -prodigal not specified. Metapop will assume this means prodigal exists in PATH."
[1] "Attempting to make genes file..."
[1] "Calculating %ID over aligned region. Use flag -global to change this."
[1] "Defaulting pct. ID to 95%"
[1] "Defaulting minimum read length to 30 bp"
[1] "Defaulting horizontal coverage (percent of bases covered at least once in a genome to be considered) to 70%"
[1] "Defaulting depth truncation level to 10. Truncation level removes the top and bottom quantiles of depth of coverage over covered positions. Covers the middle 80% by default."
[1] "Defaulting minimum average truncated depth (average depth of coverage over only covered positions between trunc and 1-trunc quantile, per genome) to 10"
[bam_sort_core] merging from 63 files and 1 in-memory blocks...
[1] "End Preprocessing: 2021-02-11 10:50:06"
[1] "Beginning microdiversity"
[1] "Defaulting number of observations of a SNV to be called a SNP to 4"
[1] "Defaulting minimum pop. representation for a SNV to be called a SNP to 1%"
[1] "Defaulting vcf min phred call quality to 30"
[1] "No sample set as the point of reference for nucleotide calls. This is an optional setting used for time series."
[1] "Nucleotide defined as reference will be the most abundant nucleotide at each SNV locus across all samples."
[1] "Making initial SNV calls... "
[mpileup] 1 samples in 1 input files
[mpileup] maximum number of reads per input file set to -d 250
[warning] samtools mpileup option `I` is functional, but deprecated. Please switch to using bcftools mpileup in future.
[mpileup] 1 samples in 1 input files
[1] "done!"
Refining SNVs into SNPs... [1] "Done!"
[1] "Defaulting max sub sample size to 10."
[1] "Correcting subsamples for linked snps"
[1] "Correcting local subsamples for linked snps"
[1] "Calculating fixation index (Fst)"
Error in data.table(row_samp = rep(samp_pairs$row_sample, length(contigs)),  :
  Item 1 has no length. Provide at least one item (such as NA, NA_integer_ etc) to be repeated to match the 1 row in the longest column. Or, all columns can be 0 length, for insert()ing rows into.
Calls: metapop_microdiv -> data.table
Execution halted
== Ending run at Thu Feb 11 14:20:58 CET 2021

Also, is there a way to restart a run from this point onwards, and not have to run the whole thing all over again?

Thank you for your help!

-Susheel

metaGmetapop commented 3 years ago

Sorry for the delay in response. We are working on updating the code with python in the front end. We are working on releasing the new version. You should be able to re-start the pipeline without re-doing the SNP calls in the newest version. More to come soon.