diff --git a/README.md b/README.md index 46e2d80..b0f28d4 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ PreProcessR -i [OPTIONS] The path to a directory containing only the genome files to be quantified. Accepted file formats are .fna and .fasta -**-o or --outidr:** +**-o or --outdir:** Path to desired directory for output files to be stored in. Directory does not need to be made before running `PreProcessR`. If the output directory already exists before a run, make sure it is empty. Default is `./StrainR2DB` diff --git a/src/Plot.R b/src/Plot.R index d1b916a..fd98c8f 100755 --- a/src/Plot.R +++ b/src/Plot.R @@ -36,7 +36,7 @@ Norm<- select(StrainID, ContigID, Start_Stop, Unique_Kmers=Nunique, Length_Contig=Length, Bases, Coverage, Mapped_Reads=Reads, Mapped_Frags=Frags, Total_Mapped_Reads_In_Sample) %>% mutate(FUKM=Mapped_Frags/(Unique_Kmers/1e3)/(Total_Mapped_Reads_In_Sample/1e6)) %>% group_by(StrainID)%>% - filter(Unique_Kmers>=quantile(Unique_Kmers,opt$subcontigfilter/100))%>% + filter(Unique_Kmers>=quantile(Unique_Kmers,opt$subcontigfilter/100, na.rm=T))%>% ungroup() write_tsv(Norm, paste0(opt$abundances, "/", opt$prefix,".abundances")) diff --git a/src/PreProcessR b/src/PreProcessR index 5b9f0e3..a53547d 100755 --- a/src/PreProcessR +++ b/src/PreProcessR @@ -48,7 +48,7 @@ fi #preprocessr pipeline echo "Creating subcontigs" mkdir "$outdir" -ksize=$(("$readsize" * 2 + 1)) +ksize=$(($readsize * 2 + 1)) if ! [ -z "$subcontigsize" ]; then subcontigsize="-s $subcontigsize"