BEDOPS bedmap confusing file for option

BEDOPS bedmap confusing file for option

1

Hi,

I’ve been trying to construct a for loop for getting mean methylation values across certain genomic features but for some reason bedmap is assuming my reference file is an option which makes no sense. My for loop is seen below and I just can’t get it to work.

bed={directory for data files}

map={reference map file}

 for region in $map/*.bed;
    do
       for f in *.bed; 
            do  
                 awk '{print $1 "t" $2 "t" $3 "t" "-" "t" $4}' $f | 
                 sed '1d' | 
                 bedmap --echo --mean ${region} ${bed}/${f} - > $bed/${f}_results.bed;
     done

  done 

However in my command line I keep getting the error

Error: Option “reference_filename” does not start with ‘–‘

Can anyone guide me on why this is happening when clearly –echo and –mean are the options.

Thank You!


BEDOPS


Methylation


bedmap

• 23 views

Read more here: Source link