<commit_before>#! /bin/sh

bamannotate=/data/common_scripts/stef/getBamAnnotate.pl
inheritance=/data/common_scripts/stef/getInheritance.pl

dir=bamannotate
mkdir -p $dir

IFS=$'\t'
while read ref tumor ; do
  echo "tumor=$tumor ref=$ref"
  echo ---- Tumor $tumor
  echo ---- Reference $ref
  tumorname="${tumor%.*}"
  refname="${ref%.*}"
  tumorout=${tumorname##*/}
  refout=${refname##*/}

    echo "*** $tumorout ***"
    echo "*** $refout ***"
    echo "$bamannotate -out $tumorout -snv $refname*.snvs.snv1 -snv $tumorname*.snvs.snv1 -ref /data/GENOMES/human_GATK_GRCh37/GRCh37_gatk.fasta -bam $ref -bam $tumor"|  ~/izip/git/opensource/ruby/once-only/bin/once-only --pfff -d $dir -v --ignore-lock
    echo "$inheritance -d -in $tumorout.bamAnn -out $tumorout -uaf_ids 3 -aff_ids 4 -min_cov 8"|~/izip/git/opensource/ruby/once-only/bin/once-only --pfff -d $dir -v --ignore-lock
done < bamfiles_2.txt
<commit_msg>Bamannotate runner<commit_after>#! /bin/sh

listfn=$1
if [ -z $listfn ] ; then 
  echo "Provide a tab delimited file with bamfile names" 
  exit 1
fi

bamannotate=/data/common_scripts/stef/getBamAnnotate.pl
inheritance=/data/common_scripts/stef/getInheritance.pl

dir=bamannotate
mkdir -p $dir

BASEDIR="$( cd "$( dirname "$0" )" && pwd )"
echo $BASEDIR

onceonly="$HOME/izip/git/opensource/ruby/once-only/bin/once-only"
refgenome=/data/GENOMES/human_GATK_GRCh37/GRCh37_gatk.fasta
bed="$HOME/full_kinome_CoDeCZ_chr17.bed"

IFS=$'\t'
while read ref tumor ; do
  echo "tumor=$tumor ref=$ref"
  echo ---- Tumor $tumor
  echo ---- Reference $ref
  tumorname="${tumor%.*}"
  refname="${ref%.*}"
  tumorout=${tumorname##*/}
  refout=${refname##*/}

  tumorbam=`find /data/mapping/cancer -name $tumor`
  tumorbase="${tumorbam%.*}"
  refbam=`find /data/mapping/cancer -name $ref`
  refbase="${refbam%.*}"
  echo "*** $tumorbam ***"
  echo "*** $refbam ***"
  echo "*** $tumorout ***"
  echo "*** $refout ***"
  echo "$bamannotate -out $tumorout -snv $refbase*.snvs.snv1 -snv $tumorbase*.snvs.snv1 -ref /data/GENOMES/human_GATK_GRCh37/GRCh37_gatk.fasta -bam $refbam -bam $tumorbam"|  ~/izip/git/opensource/ruby/once-only/bin/once-only --pfff -d $dir -v 
  echo "$inheritance -d -in $tumorout.bamAnn -out $tumorout -uaf_ids 3 -aff_ids 4 -min_cov 8"|~/izip/git/opensource/ruby/once-only/bin/once-only --pfff -d $dir -v 
  exit
done < $listfn

{'fraction_non_alphanumeric': 0.18899317406143346, 'fraction_numerical': 0.011945392491467578, 'mean_word_length': 3.8854166666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6513900', 'n_tokens_mistral': 1066, 'n_tokens_neox': 952, 'n_words': 183}