swh:1:snp:b7aa55933c95f9160605acf78cf6a2656abcb000
Raw File
Tip revision: 1bba7bb7e6cc96e60cd6345afccbebd0b8aef2a6 authored by Wei Wei on 30 May 2022, 18:31:41 UTC
more simulated stuff
Tip revision: 1bba7bb
do_get_wgs_libraries_ogu.sh
#!/bin/bash
dir=$1 #the e2r... directory
db=data/concat.fna
#generates wgs reads for each experiment
#[ -d $dir/reads ] | mkdir $dir/reads

N=10
for f in $dir/abundance_files/*
do
	file_name="${f%%.*}"
	bn="${file_name##*/}"
	#echo $bn
	#profile=$bn-reads.profile
	reads=$bn-reads.fastq
	output_dir=$dir/reads
	#echo $profile
	#if [ -f $dir/profile_precision/$profile ] #if profile exists
	#then
	#	echo "profile exists"
	#	rm $dir/wgs_reads/$reads || true #remove reads 
	#elif  [ -f $dir/wgs_reads/$reads ] && [ "$(cat "$dir"/wgs_reads/"$reads" | wc -l)" -eq 4000000 ] 
	#then
	#	echo "reads ready"
	#echo "generate reads"
	grinder -rf $db -tr 1000000 -af $f -md poly4 3e-3 3.3e-8 -mr 80 20 -ql 50 10 -bn $bn -od $output_dir -fq 1 -rd 150 &
	(( ++count % N == 0)) && wait
	
done
wait
echo "all done"
back to top