4dc9aaa85b70bdd4fd58d77b323147e28dbe16e6 hiram Sat Dec 24 13:01:30 2022 -0800 fixup new rmToTrackHub.pl usage no redmine diff --git src/hg/utils/automation/asmHubRepeatMasker.sh src/hg/utils/automation/asmHubRepeatMasker.sh index df0a113..3f021fa 100755 --- src/hg/utils/automation/asmHubRepeatMasker.sh +++ src/hg/utils/automation/asmHubRepeatMasker.sh @@ -29,44 +29,52 @@ # assume this file name pattern export faAlign=`echo "${rmOutFile}" | sed -e 's/sorted.fa.out/fa.align/; s/.gz//;'` export RepeatMaskerPath="/hive/data/staging/data/RepeatMasker221107" if [ -d "${destDir}" ]; then cd "${destDir}" # might already be gzipped if [ ! -s "${faAlign}" ]; then faAlign="${faAlign}.gz" fi # align file only exists when RM has been run locally, not for NCBI version # it is OK if it is missing, can do this anyway without it if [ -s "${faAlign}" ]; then - printf "$RepeatMaskerPath/util/rmToTrackHub.pl -genome \"${asmId}\" -hubname \"${asmId}\" -out \"${rmOutFile}\" -align \"${faAlign}\"\n" 1>&2 - $RepeatMaskerPath/util/rmToTrackHub.pl -genome "${asmId}" -hubname "${asmId}" -out "${rmOutFile}" -align "${faAlign}" + printf "# using faAlign file: %s\n" "${faAlign}" 1>&2 + printf "$RepeatMaskerPath/util/rmToTrackHub.pl -sizes \"${chrSizes}\" -genome \"${asmId}\" -hubname \"${asmId}\" -out \"${rmOutFile}\" -align \"${faAlign}\"\n" 1>&2 + $RepeatMaskerPath/util/rmToTrackHub.pl -sizes "${chrSizes}" -genome "${asmId}" -hubname "${asmId}" -out "${rmOutFile}" -align "${faAlign}" # in place same file sort using the -o output option sort -k1,1 -k2,2n -o "${asmId}.fa.align.tsv" "${asmId}.fa.align.tsv" & else - printf "$RepeatMaskerPath/util/rmToTrackHub.pl -out \"${rmOutFile}\"\n" 1>&2 - $RepeatMaskerPath/util/rmToTrackHub.pl -out "${rmOutFile}" + printf "# there is no faAlign file\n" 1>&2 + printf "$RepeatMaskerPath/util/rmToTrackHub.pl -sizes \"${chrSizes}\" -genome \"${asmId}\" -hubname \"${asmId}\" -out \"${rmOutFile}\"\n" 1>&2 + $RepeatMaskerPath/util/rmToTrackHub.pl -sizes "${chrSizes}" -genome "${asmId}" -hubname "${asmId}" -out "${rmOutFile}" fi sort -k1,1 -k2,2n -o "${asmId}.sorted.fa.join.tsv" "${asmId}.sorted.fa.join.tsv" & wait + printf "bedToBigBed -tab -as=$HOME/kent/src/hg/lib/bigRmskBed.as -type=bed9+5 + \"${asmId}.sorted.fa.join.tsv\" \"${chrSizes}\" + \"${asmId}.rmsk.bb\" &\n" 1>&2 bedToBigBed -tab -as=$HOME/kent/src/hg/lib/bigRmskBed.as -type=bed9+5 \ "${asmId}.sorted.fa.join.tsv" "${chrSizes}" \ "${asmId}.rmsk.bb" & if [ -s "${asmId}.fa.align.tsv" ]; then + printf "bedToBigBed -tab -as=$HOME/kent/src/hg/lib/bigRmskAlignBed.as + -type=bed3+14 \"${asmId}.fa.align.tsv\" \"${chrSizes}\" + \"${asmId}.rmsk.align.bb\" &\n" 1>&2 bedToBigBed -tab -as=$HOME/kent/src/hg/lib/bigRmskAlignBed.as \ -type=bed3+14 "${asmId}.fa.align.tsv" "${chrSizes}" \ "${asmId}.rmsk.align.bb" & fi wait if [ -s "${asmId}.fa.align.tsv" ]; then gzip "${asmId}.fa.align.tsv" & fi gzip "${asmId}.sorted.fa.join.tsv" & wait rm -fr classBed rmskClass ${asmId}.rmsk.tab bbi/*.rmsk.*.bb \ bbi/*.rmsk.*.bb mkdir classBed rmskClass rm -f ${asmId}.rm.out mkdir -p bbi