# HG changeset patch # User nikos # Date 1423652735 18000 # Node ID 7a5780dc7b71d0514dd88d72bb92e185119a1bc3 # Parent 68af3d2260aa26c11175644fda7a13e56d295a9c Fixed bug with "rm merged_temp2" diff -r 68af3d2260aa -r 7a5780dc7b71 summarize_unique_barcodes.sh --- a/summarize_unique_barcodes.sh Mon Jan 26 07:13:03 2015 -0500 +++ b/summarize_unique_barcodes.sh Wed Feb 11 06:05:35 2015 -0500 @@ -174,12 +174,14 @@ if [ ! -s paired ]; then zcat merged_temp.gz | awk '{print $1, $2, "NA", $4, $5}' - > merged_temp2 gzip -c merged_temp2 > merged_temp.gz + rm merged_temp2 fi #Fix priming position if [ ! -z $priming_pos ]; then zcat merged_temp.gz | awk -v pos="${priming_pos}" '{print $1, $2, pos, $4, $5}' - > merged_temp2 gzip -c merged_temp2 > merged_temp.gz + rm merged_temp2 fi #File summary.txt columns: RNA_ID, Start, End, barcode sequence, sequenced_count[=number of sequenced fragments fulfilling previous requiremnts] @@ -218,8 +220,8 @@ #Produce k2n file if [ "$k2n" == "True" ]; then - Rscript $R_SCRIPT_PATH/k2n.R merged_temp.gz $output_dir/read_counts.txt ${max_observed_barcodes} $BAR_LEN $output_dir/k2n.txt + Rscript $R_SCRIPT_PATH/k2n.R merged_temp.gz $output_dir/unique_barcodes.txt $output_dir/k2n.txt fi #Remove temp files -rm merged_temp2 merged_temp.gz positions_temp_sorted.gz paired +rm merged_temp.gz positions_temp_sorted.gz paired