# HG changeset patch # User fubar # Date 1370587569 14400 # Node ID 9b2f58a260e9e506564d17b0d15277296d380137 # Parent b227f5edbe529d93119c5892d5a583c25a987b7a Uploaded diff -r b227f5edbe52 -r 9b2f58a260e9 htseq_bams_to_count_matrix/generatetest.sh --- a/htseq_bams_to_count_matrix/generatetest.sh Fri Jun 07 01:50:53 2013 -0400 +++ b/htseq_bams_to_count_matrix/generatetest.sh Fri Jun 07 02:46:09 2013 -0400 @@ -1,1 +1,2 @@ -python ../htseqsams2mx.py -g rn4_chr20_100k.gtf -o test.xls --samf "'rn4chr20test1.bam','col1'" --samf "'rn4chr20test2.bam','col2'" +#python ../htseqsams2mx.py -g rn4_chr20_100k.gtf -o test.xls --samf "'rn4chr20test1.bam','col1'" --samf "'rn4chr20test2.bam','col2'" +python ../htseqsams2mx.py -g rn4_chr20_100k.gtf -o htseqsams2mx_test1_out.xls --samf "'rn4chr20test1.bam',''" --samf "'rn4chr20test2.bam',''" diff -r b227f5edbe52 -r 9b2f58a260e9 htseq_bams_to_count_matrix/htseqsams2mx.py --- a/htseq_bams_to_count_matrix/htseqsams2mx.py Fri Jun 07 01:50:53 2013 -0400 +++ b/htseq_bams_to_count_matrix/htseqsams2mx.py Fri Jun 07 02:46:09 2013 -0400 @@ -306,6 +306,8 @@ assert os.path.isfile(b),'## Supplied input sam file "%s" not found' % b sam_filenames.append(b) sampName = scolnames[i] # better be unique + if sampName == "": + sampName = b # for test sampName = sampName.replace('#','') # for R sampName = sampName.replace('(','') # for R sampName = sampName.replace(')','') # for R diff -r b227f5edbe52 -r 9b2f58a260e9 htseq_bams_to_count_matrix/htseqsams2mx.xml --- a/htseq_bams_to_count_matrix/htseqsams2mx.xml Fri Jun 07 01:50:53 2013 -0400 +++ b/htseq_bams_to_count_matrix/htseqsams2mx.xml Fri Jun 07 02:46:09 2013 -0400 @@ -13,17 +13,19 @@ htseqsams2mx.py -g "$gfffile" -o "$outfile" -m "$model" --id_attribute "$id_attr" --feature_type "$feature_type" --samf "'$firstsamf','${firstsamf.name}'" - #if secondsamfile: + #if $secondsamf: --samf "'$secondsamf','${secondsamf.name}'" #end if - #if thirdsamfile: + #if $thirdsamf: --samf "'$thirdsamf','${thirdsamf.name}'" #end if - #if fourthsamfile: + #if $fourthsamf: --samf "'$fourthsamf','${fourthsamf.name}'" #end if #for $s in $samfiles: - --samf "'${s.samf}','${s.samf.name}'" + #if $s.samf.name: + --samf "'${s.samf}','${s.samf.name}'" + #end if #end for @@ -72,16 +74,15 @@ + - - - - - - + + + + diff -r b227f5edbe52 -r 9b2f58a260e9 htseq_bams_to_count_matrix/test-data/htseqsams2mx_test1_out.xls --- a/htseq_bams_to_count_matrix/test-data/htseqsams2mx_test1_out.xls Fri Jun 07 01:50:53 2013 -0400 +++ b/htseq_bams_to_count_matrix/test-data/htseqsams2mx_test1_out.xls Fri Jun 07 02:46:09 2013 -0400 @@ -1,4 +1,4 @@ -Contig col1 col2 +Contig rn4chr20test1.bam rn4chr20test2.bam Clic2 494 944 F1M7K0_RAT 3 2 Tmlhe 164 172