<commit_before>#!/bin/bash
# this script needs one command line argument: the species name
SPECIES=$1

# verify command line argument
if [ "$SPECIES" == "Rhagoletis_cerasi" ]; then
echo "going to assemble Rhagoletis cerasi"
elif [ "$SPECIES" == "Gonioctena_quinquepunctata" ]; then
echo "going to assemble Gonioctena quinquepunctata"
else
echo "Usage: $0 <Rhagoletis_cerasi or Gonioctena_quinquepunctata>"
        exit
fi

# location of project. all paths are constructed relative
# to this location
PROJECT=/home/assembly/de-novo-assembly

# optimal k-mer size was reconstructed using kmergenie, see
# kmergenie.sh and ../results/kmergenie/kmergenie_summary.ini
K=23

# make output dir
RESULTS=$PROJECT/results/velvet
mkdir -p $RESULTS

# minimum number of pairs to join contigs,
# set to same as SOAPdenovo
N=3

#longpaid because the data is longPaired
LP="longPaired"

#The type of the data input
#Which for us is fastq format
T="-fastq"

# To Separate the files
S="-separate"

# zie 4.1 in http://www.ebi.ac.uk/~zerbino/velvet/Manual.pdf
velveth /home/assembly/velvet_1.2.10 $K $LP $T $S /home/assembly/data/schilthuizen/RawData/C0A7AACXX_101851-02_TGACCA_L001_R1.fastq.gz /home/assembly/data/schilthuizen/RawData/C0A7AACXX_101851-02_TGACCA_L001_R2.fastq.gz

###### Is nog niet af!######
# Er moet nog gekeken worden hoe meer dan 2 datasets ingelezen kunnen worden of dit gewoon toevoegen is of # # een aparte commando. Verder moet deze dan worden ingelezen in de terminal input. Ook moet velvetg nog #worden gerunned worden na dat velveth klaar is, met de parameters van dien.

<commit_msg>Update velvet.sh<commit_after>#!/bin/bash
# this script needs one command line argument: the species name
SPECIES=$1

# verify command line argument
if [ "$SPECIES" == "Rhagoletis_cerasi" ]; then
        echo "going to assemble Rhagoletis cerasi"
elif [ "$SPECIES" == "Gonioctena_quinquepunctata" ]; then
        echo "going to assemble Gonioctena quinquepunctata"
else
        echo "Usage: $0 <Rhagoletis_cerasi or Gonioctena_quinquepunctata>"
        exit
fi

# location of project. all paths are constructed relative
# to this location
PROJECT=/home/assembly/de-novo-assembly

# read environment variables, same as abyss
source $PROJECT/conf/abyss/$SPECIES.sh

# optimal k-mer size was reconstructed using kmergenie, see
# kmergenie.sh and ../results/kmergenie/kmergenie_summary.ini
K=23

# make output dir and log file names
RESULTS=$PROJECT/results/velvet
OUT=$RESULTS/$SPECIES
mkdir -p $RESULTS
mkdir -p $OUT
LOG=$OUT.log
ERR=$OUT.err

# the data is longPaired
READTYPE="-longPaired"

# the type of the data input, which for us is fastq format
FORMAT="-fastq"

# separate input files XXX is this needed?
S="-separate"

# minimum contig length
MINLENGTH=100

# same as SOAPdenovo
INSERTSIZE=200

# interdigitate the sequences
INFILES=""
for PAIR in $PAIRS; do
        for FILE in ${!PAIR}; do
                gunzip $FILE
        done
        UNZIPPED=`echo ${!PAIR} | sed -e 's/.gz//'`
        INFILE=$DATA/$SPECIES-$PAIR.fastq
        shuffleSequences_fastq.pl $UNZIPPED $INFILE
        INFILES="$INFILES $INFILE"        
done

# zie 4.1 in http://www.ebi.ac.uk/~zerbino/velvet/Manual.pdf
/usr/bin/time --verbose velveth $OUT $K $READTYPE $FORMAT $INFILES > $OUT 2> $ERR
/usr/bin/time --verbose velvetg $OUT -ins_length $INSERTSIZE -min_contig_lgth $MINLENGTH -cov_cutoff auto >> $OUT 2>> $ERR


{'fraction_non_alphanumeric': 0.10244333235207537, 'fraction_numerical': 0.01589637915808066, 'mean_word_length': 4.0944527736131935, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4388569', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1178, 'n_words': 365}